Storage Backends

Storage scheme

limits uses a url style storage scheme notation (similar to the JDBC driver connection string notation) for configuring and initializing storage backends. This notation additionally provides a simple mechanism to both identify and configure the backend implementation based on a single string argument.

The storage scheme follows the format {scheme}://{parameters} is provided to lookup and construct an instance of a storage based on the storage scheme. For example:

uri = "redis://localhost:9999"
options = {}
redis_storage =, **options)



The in-memory storage takes no parameters so the only relevant value is memory://


Requires the location of the memcached server(s). As such the parameters is a comma separated list of {host}:{port} locations such as memcached://localhost:11211 or memcached://localhost:11211,localhost:11212, etc…

Memcached on Google App Engine

Requires that you are working in the GAE SDK and have those API libraries available. :code: gaememcached://


Requires the location of the redis server and optionally the database number. redis://localhost:6379 or redis://localhost:6379/1 (for database 1).

If the database is password protected the password can be provided in the url, for example redis://:foobared@localhost:6379.

Redis over SSL

Redis does not support SSL natively, but it is recommended to use stunnel to provide SSL suport. The official Redis client redis-py supports redis connections over SSL with the scheme rediss. rediss://localhost:6379/0 just like the normal redis connection, just with the new scheme.

Redis with Sentinel

Requires the location(s) of the redis sentinal instances and the service-name that is monitored by the sentinels. redis+sentinel://localhost:26379/my-redis-service or redis+sentinel://localhost:26379,localhost:26380/my-redis-service.

If the database is password protected the password can be provided in the url, for example

Redis Cluster

Requires the location(s) of the redis cluster startup nodes (One is enough). redis+cluster://localhost:7000 or redis+cluster://localhost:7000,localhost:70001