What tenants cost
Brussle bills each tenant’s usage as it bills any other usage: judgments, storage, writes and queries. Platforms also pay a small tenant fee for each active tenant namespace in each billing period, past the namespaces that the plan includes (25 on Developer and Team, 100 on Scale).- A namespace is active in a period if Brussle billed at least one row in it in that period.
- A namespace that you only write to or read from never counts.
default/quickstartnever counts.
- $2 up to the 1,000th namespace
- $1 up to the 10,000th
- $0.50 above that
The 3,000 tenants that Brussle did not judge cost only their storage. On Scale, which includes 100 namespaces, the same platform would pay $2,800 of fee (900 × $2 + 1,000 × $1). See tenant namespaces for the bands, and for when Brussle takes the fee from your balance.
Staging tenants count like any other
You can copy your tenants in staging (for exampleacme/staging/tenant_123 beside acme/prod/tenant_123). Each staging tenant that Brussle judges in a billing period is an active namespace and counts toward the tenant fee like a production tenant.
You can mark acme/staging/ as non-production, which keeps staging’s tenants out of production’s pooled correction. The mark does not change the tenant fee or any other line of your bill.
For example, a platform on Team has 1,600 production tenants that Brussle judged this billing period, and a staging copy of each that Brussle also judged, with 75M standard rows on Jev between them, which count as 150M:
To keep staging cheap, copy only the tenants that you need to test. With 20 staging tenants instead of 1,600, the fee is $2,570 (975 × $2 + 620 × $1). Give each staging namespace a small budget, and try things in
default/quickstart, which is free up to its limit. See staging and test environments for the layout, the mark, and how to move a change from staging to production.
Name namespaces as a hierarchy
Use the hierarchy for the environment and the tenant, as inacme/prod/tenant_123 and acme/staging/tenant_123.
- Lists (
GET /namespaces?prefix=acme/prod/) and key scopes work on prefixes. - A delete works on one namespace at a time.
- There is no project object, since the hierarchy is your project structure.
Scope keys by prefix or namespace
Limit each API key to a namespace prefix or to one namespace and give it a role, so each backend service has only the access that it needs:
A prefix stops at a
/, so acme/prod/tenant_1* includes acme/prod/tenant_1 and everything under acme/prod/tenant_1/, but never acme/prod/tenant_12. For a tenant’s own key, scope the key to the tenant’s namespace.
A scope can name namespaces that do not exist yet. You can create a key for team-a/* or for acme/prod/tenant_456 before its first write and give it to the team or tenant when you set them up. The key’s first write or judgment creates the namespace.
Keys belong to your organization, not to people, and you create them on the dashboard’s Keys page. The page asks for the role of each key and never chooses one for you, and it shows the role and the scope with the new key.
Size for your organization’s limits
Your tenants’ keys share your organization’s limits:- Keys. An organization has at most 10,000 API keys that are not revoked, and the Keys page shows how many you have. When a tenant leaves, revoke its key.
- Requests. Each key can send 1,000 requests a second, and all your organization’s keys together 2,000, so more keys do not give more requests. A request past either limit gets
rate_limited(429) withRetry-After, anddetails.rate_limitsays which limit it passed (per_keyorper_org). One busy tenant can use the organization’s limit, and then other tenants’ requests get429too. If one tenant must not slow the others, limit each tenant’s requests in your own service. - Higher limits. When your tenants together need more keys or more requests, email scale@brussle.com with your organization’s id and the limit that you need.
Create many tenants at once
The first write, judgment, group or subscription for a new name creates its namespace, and your organization creates at most 1,000 new namespaces in each UTC minute. To onboard more tenants than that at once (for example when you move your existing customers to Brussle), do one of these:- Create the namespaces at most 1,000 a minute.
- Send the requests at once and let the SDKs retry. Brussle refuses a request that would create one namespace too many with
rate_limited(429) and aRetry-Afterof the seconds until the next minute. The SDKs wait and retry up tomax_retries(maxRetries) times, 2 by default. Each retry gets at most one more minute’s 1,000 namespaces, so for N new tenants at once, set the retries to at least N ÷ 1,000. Without an SDK, wait forRetry-Afterand send the same request again.
Define judgments once for every tenant
Create the judgment on a prefix, such asacme/prod/*, and every namespace under the prefix gets it, including tenants that you create later. A tenant can override its thresholds and its freshness policy, and can detach the judgment into its own copy. See templates.
You can define a judgment on each tenant’s namespace instead, with one call for each tenant (usually when you set the tenant up):
settles_definition is the settles judgment from match one record to another, with confirm set. Each tenant then has its own definition and versions, and its own correction on its own outcomes alone. The first create on a new tenant creates its namespace, so it counts toward the creation limit.
Each tenant’s own model key
A provider key stored for your organization reaches every tenant namespace. To run a tenant on its own key (its own provider account, its own limits), store a key for that tenant’s namespace, which wins there and only there. A tenant whose key the provider rejects waits, withcredential_unusable, and never falls back to the organization’s key, while revoking a tenant’s key returns it to the organization’s.
Correct each tenant on its outcomes
Each tenant posts outcomes on its own namespace path, and on a template Brussle pools them across tenants into one correction for each template version and engine epoch, fitted each night. A tenant that you add today reads the pooled correction from its first answer. Since the pool was fitted on other tenants’ outcomes, it is not yet measured on that tenant. Once the tenant posts outcomes, the report on its own path measures what it reads against them. On Team and Scale, a tenant also gets its own correction, held toward the pool’s, from 50 outcomes of its own with 15 of each kind. On abool with features, the tenant also gets its own weights over the features from 100 outcomes with 20 of each kind, so a count that means something different for one of your customers is read as it means there. A tenant reads its own correction only when it is clearly better than the pool on that tenant’s held-out outcomes.
To hold one fit for every tenant, pin it on the template’s prefix path, since a tenant cannot set calibration itself. Per-customer corrections covers the rest: what a tenant reads and why, the interval on a tenant, and which readers are judged again.
Get told when documents change in any tenant
A subscription on the same prefix tells you when a document in any tenant starts or stops matching a filter, so you do not poll each tenant. Here, the subscription tells you when a payment in any tenant waits for a person becausesettles could not match it:
- Each event names the tenant in
namespace, so one receiver can route events for all your tenants without a lookup.subscription.defined_onsays that the event came from the template. - Each tenant keeps its own set of matching documents, starting at its next change. An idle tenant does no subscription work, and tenants that you create later are included.
- Tenants cannot opt out or change the subscription, so to leave a tenant out, add a condition on
idor on an attribute to the filter. - Staging works the same way. Put a subscription on
acme/staging/*with an endpoint scoped toacme/staging/, and staging events go only to your staging receiver. An endpoint must include the full prefix of each subscription that sends to it. - The limit. A tenant can create a subscription only while it has fewer than 100, counting the template’s, although subscriptions that the template gets later can take a tenant past 100. See templates.
Budgets per tenant
Give each namespace its own judging budget for each billing period, so a burst in one tenant cannot make your bill large. Brussle prices each request to the engine before it sends it, and stops judging before the cost goes past the budget. When a tenant’s namespace reaches its budget:- Its changed answers become
stale. - Its documents that Brussle never judged read
unavailable. - Its writes continue. With
"on_exceeded": "reject", Brussle refuses them withbudget_exceededinstead.
Keep tenants fast after idle time
An idle namespace falls out of the cache, so the first query after that is cold (some hundreds of milliseconds). Two tools help:- Warm a namespace with
POST /namespaces/{ns}/warm(ns.warm()) when you know that a session is about to start. Warming is free and best effort. See warm a namespace. - Pin a namespace that must stay fast after idle time with
PATCH /namespaces/{ns}and{"pinned": true}, and it stays in the cache once loaded. Pinning has a price. See pin a namespace.