B2B SaaS
Each customer's cache and session data lives under its own prefix on a shared cluster, isolated by ACL.
Serve many customers from one cluster, each confined to its own keys with ACLs, with a tenant registry that records who belongs where.
An id, a display name and quota values recorded with the tenant.
An animated walkthrough with real HotKV commands and example replies. Click any step to jump to it.
Running one cache or data store per customer is expensive and painful to operate, but sharing one means you need strong isolation between customers and a record of which users belong to which customer.
ACL users with key patterns confine each tenant's application to its own key prefix. The tenant registry records which users belong to which tenant, along with quota values. The registry is the same on every node of a cluster.
An id, a display name and quota values recorded with the tenant.
TENANT.CREATE acme "Acme Corp" MAX_MEMORY 1073741824 MAX_KEYS 1000000The ACL user can only touch keys under acme: and cannot run dangerous commands.
ACL SETUSER acme-app on >s3cret ~acme:* +@all -@dangerousThe registry records which users belong to which tenant.
TENANT.BIND acme acme-appacme's app reads its own keys. A read of globex's key is refused by the ACL.
GET globex:billing:planThe quota values recorded for the tenant. In this release the usage counters are not filled in by client traffic, so they read 0.
TENANT.STATS acmeEach customer's cache and session data lives under its own prefix on a shared cluster, isolated by ACL.
Client projects are tenants with their own users, so access can be granted and revoked per client.
ACL users limited to a key prefix and a command set.
ACL SETUSERTenants with names, states, quota values and bound users, the same on every node.
TENANT.CREATETENANT.BINDEach tenant's name, state, quota values and bound users.
TENANT.INFOTENANT.STATSTurn the tenant's ACL users off.
ACL SETUSER offNo. They are recorded and shown in TENANT.STATS, but HotKV does not enforce them on commands, and the usage counters are not filled in by client traffic in this release. Isolation comes from ACL rules.
TENANT.SUSPEND records a state for your tooling. To lock a tenant's users out, turn them off with ACL SETUSER.
ACLs work on every plan. The tenant registry is part of the Scale plan.
HotKV speaks the Redis protocol, so you can point an existing client at it and run these same commands.