Skip to main content

Quick Start Guide

Scale database reads globally in a few minutes.#

1. Create An account#

Signup and create a free PolyScale account here. There is a free tier and no credit card is required.

2. Create A Cache#

A Polyscale account can have one or more caches defined. A cache simply identifies a database origin via a hostname and port that you wish to cache data for. Typically you create a cache per database for simplicity.

To create a new cache, click the New Cache button in the upper right of the caches dashboard and enter the hostname and port of the database you wish to connect to.

New cache buttonClick the New Cache button
Create new cacheEnter the origin database hostname and port

3. Connect Client Apps#

To connect to the origin database via PolyScale simply update any client applications as follows:

1. Use a PolyScale database hostname and port:#

  • MySQL: mysql.polyscale.global on 3306
  • MariaDB: mariadb.polyscale.global on 3307
  • PostgreSQL postgres.polyscale.global on 5432

2. Provide a PolyScale Cache ID as part of the connection string:#

The Cache ID can be found under the Settings tab of any cache (as detailed in Step 2 above). For MySQL and MariaDB, this is prepended to the database username seperated with a hyphen (see example below). For PostgreSQL, an application_name property containing the PolyScale Cache ID is required e.g. application_name=my_database_password.

For further details, see Getting Connected.

MySQL Example#

If the username provided by PolyScale is 8c126a4d-567a-4382-9ffe-b31ec50635f2 and the origin database username is foobar, the database username to connect via PolyScale would be 8c126a4d-567a-4382-9ffe-b31ec50635f2-foobar.

Connection credentialsObtaining your PolyScale connection details for MySQL


info

PolyScale does not save your database username and password. To connect to your database via PolyScale, no database credentials on the origin database change.

4. Configure Cache#

All database traffic flowing through PolyScale will be captured within the Observability tab of each cache. PolyScale provides visualizations and metrics to make it easy to examine query behavior. A Cacheability score is provided that indicates query candidates that are best suited to be cached, as well as a Recommended TTL value.

If PolyScale has derived an optimum TTL value for a specified query, it will be listed as a button option within the Actions column. Click to accept the TTL value. If no "Set TTL" button is listed as an Action, PolyScale does not yet have enough data to make a TTL recommendation. Revisit the query at a later date or, manually set a TTL by selecting the menu dropdown from the Actions column and selecting Configure Cache.

Read more about Cache Configuration.

Cache ConfigurationOrderdering by cacheability and set a recommended TTL