Upstash works with Redis® API, that means you can use any Redis client with Upstash. At the Redis Clients page you can find the list of Redis clients in different languages. Simplest way to connect to your database is to useDocumentation Index
Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
redis-cli.
Because it is already covered in Getting Started, we
will skip it here.
Database
After completing the getting started guide, you will see the database page as below:
UPSTASH_REDIS_REST_URL andUPSTASH_REDIS_REST_TOKEN
on this page.
Below, we will provide examples from popular Redis clients, but the information above should help you configure all Redis clients similarly.
TLS is enabled by default for all Upstash Redis databases. It’s not possible
to disable it.
@upstash/redis
@upstash/redis is the official SDK developed and maintained by Upstash. It is HTTP-based, which makes it ideal for serverless environments like Vercel and Cloudflare Workers. In highly concurrent serverless workloads, TCP-based clients can run into connection issues.Node.js
Library: ioredisPython
Library: redis-pyJava
Library: jedisJedis does not offer command level retry config by default, but you can handle
retries using connection pool. Check Retrying a command after a connection
failure
PHP
Library: phpredisPhpredis supports connection level retries through
OPT_MAX_RETRIES. However,
for command level retries, it only supports SCAN
command.