Readyset CLI
Readyset is made up of the following core components:
Component | Purpose |
---|---|
Readyset Server | Takes a snapshot of your database, listens to the database's replication stream for updates, and keeps queries cached in an in-memory dataflow graph. |
Readyset Adapter | Handles connections from SQL clients and ORMs, forwards uncached queries to the upstream database, and runs cached queries against the Readyset Server. |
This page introduces the readyset
commands for running these components, as well as information about environment variables that can be used in place of certain command options.
Commands
Command | Usage |
---|---|
readyset | Start the Readyset Server and Adapter as a single process, or start the Readyset Adapter as a distinct process from the Readyset Server (see: |
readyset-server | Start the Readyset Server, when running the Readyset Adapter as a distinct process. |
Environment variables
For many common readyset
and readyset-server
options, you can set environment variables once instead of manually passing the flags each time you execute commands.
- To find out which flags support environment variables, see the documentation for each command.
- To output the current configuration of Readyset and other environment variables, run
env
. - When a command uses environment variables, the variable names are printed to the command's logs.
Readyset prioritizes command flags, environment variables, and defaults as follows:
- If a flag is set for a command, Readyset uses it.
- If a flag is not set for a command, Readyset uses the corresponding environment variable.
- If neither the flag nor environment variable is set, Readyset uses the default for the flag.
- If there's no flag default, Readyset returns an error.