acme/prod/tenant_123 holds the production documents of your customer tenant_123).
Each namespace numbers its writes in order. A document’s revision is a number in this order, and so is the position at which an answer read its related documents, which is how each answer can say exactly which writes it includes.
- No create call. The first write, judgment, group or subscription for a name creates the namespace. Until then every other request under the name returns
not_found(“namespace not found”), reads included: a get of the namespace, a document or a judgment, a list of its judgments, a query and a post of outcomes. Code that creates a judgment only when it is missing can treat thatnot_foundas missing. An organization creates at most 1,000 namespaces a minute. See limits. - Names are paths.
acme/prod/tenant_123is one namespace. Listing namespaces and the scope of an API key work on a prefix such asacme/prod/, but a delete works on one namespace at a time. - Keys can come first. You can create a key for a prefix or a namespace before anything exists under it, and the writes that you make with the key create the namespaces.
- Templates. A judgment that you create on
acme/prod/*is a template, and each namespace under the prefix gets the judgment. - Names in URLs. Write each
/in the name as%2Fin a URL path (/namespaces/acme%2Fprod%2Ftenant_123/query, for example). The SDKs do this for you. - Idle namespaces. An idle namespace costs nothing but its storage. The first query after a namespace was idle is slower (a cold query), so to make cold queries rare, pin the namespace or warm it before a session.
- No limit on the number of namespaces. An organization can have as many as it needs, and only how fast you create them and how large each one gets have limits.
- Name rules. A name is at most 256 bytes of
A-Z a-z 0-9 . _ : / -. A name cannot be exactly.or.., because a URL path cannot carry these names.
Tenants and environments
- A tenant is whose data it is. A tenant is one of your customers if you run a platform, and you have one tenant if you do not.
- An environment is the copy of your software that wrote the data (production or staging, for example).
acme/prod/tenant_123 and acme/staging/tenant_123), since each environment is then a prefix that one key scope, one template and one non-production marking can cover.
Split a tenant into more namespaces only for data that no judgment reads together, since a judgment reads related documents only in the namespace of the judged document. A payment and the open invoices that it could settle must share a namespace.
A tenant whose support tickets and invoices no judgment reads together can keep them in acme/prod/tenant_123/support and acme/prod/tenant_123/billing, but each namespace counts on its own toward the tenant fee.
Settings
PATCH /namespaces/{ns} changes the settings of a namespace, and your organization’s audit log records each change.
budget
budget caps what judging in this namespace can cost in one billing period, and it starts again with each period. A billing period starts on the day that your organization added its card, not on the 1st.
Brussle prices each request to the engine before it sends it, and never sends a request that would take the namespace past its budget, so that request’s documents wait, unjudged and unbilled. Judging stops at the budget rather than after it. System behavior gives the exact bound.
on_exceeded sets what happens when judging stops:
"pause"lets writes continue. Answers becomestale, and an answer for a document that was never judged isunavailable."reject"makes writes fail withbudget_exceeded.
budget_paused: true in either case, and the owners and admins of your organization get an email. Once you raise or remove the budget, budget_paused clears and Brussle judges the documents that waited.
Other settings
pinned: truekeeps the namespace in the cache once it is loaded, so idle time does not make its queries cold. The first query after you pin it can still be cold (and so can a query after Brussle restarts a node). To load the namespace before your queries, warm it. A pinned namespace is billed for each GiB-month as a pinned namespace. See pin a namespace.default_engineis the engine that a new judgment gets when its create request has noengine, ahead of your key’s default model. Changing it never changes existing judgments.- It must be a version that
GET /engineslists asactive, such as{"name": "gpt-6-luna", "version": "current"}, or your own model, and Brussle refuses an included version that is not active withengine_version_unavailable. - Without it, a create that has no
engineuses your key’s default model, else the included engine for the column’s type. See choose an engine version.
- It must be a version that
- Provider keys. A provider key stored for a namespace wins over the organization’s key for that provider, in that namespace only. If the provider rejects the namespace’s key, Brussle never falls back to the organization’s key, since that would send the namespace’s data under a key its owner did not choose. Revoking the namespace’s key returns the namespace to the organization’s.
- Only some engines read images, and setting
default_enginegives no warning about them. The warning comes from a create that gets an engine that reads no images while its recipe names image paths (images.<name>).
- Only some engines read images, and setting
fanoutsets how fan-out runs in this namespace. Fan-out happens when Brussle judges many documents again because a document that they read changed, on judgments that read the document that each judged document points to or the documents that share a key with it.shareis the largest part of the namespace’s in-flight engine requests that fan-out can use, 0.5 by default, although fan-out can always use at least one request.GETreturns the value in effect.- Each judgment also has its own rolling limit, in
freshness.fanout.
What GET returns
GET /namespaces/{ns} returns:
- the settings;
budget_paused;- the number of documents and bytes (
stats.documentsandstats.bytes); spend_month_usd, the cost of judging in the current billing period;- the projected monthly cost of
periodicjudgments.
0.00075.
The number of documents and bytes can be behind your latest writes, usually by a few seconds and by more while you write a lot (during an import, say), so read them again a little later before you compare them with your own count. A get or a strong query sees each write as soon as Brussle acknowledges it.
Limits
These limits apply to each namespace, and Limits lists them all.- Size. A namespace holds at most 100,000,000 documents or 256 GB, whichever comes first, and the bytes are the namespace’s storage.
GET /namespaces/{ns}returns the number of documents and bytes (whatGETreturns). - At the size limit. Brussle refuses a write that would make the namespace larger with
too_large(413), wheredetails.limitisdocumentsorbytesanddetails.documentsanddetails.bytesgive the current size. Deletes still go through, and so do updates that keep a document’s size or shrink it, so you can always change and empty a full namespace. The size that Brussle checks can be a few seconds behind your writes, so a namespace can go a little past a limit. Judging continues, and its evaluations still add bytes. The SDKs do not retrytoo_large, so delete documents or put new data in another namespace (one for each tenant or each year, for example). - Attribute names. The documents of a namespace have at most 1,024 different attribute names, and Brussle refuses a write that adds one more name with
too_large, naming the attribute indetails.path. - Creation. An organization creates at most 1,000 new namespaces in each UTC minute, and requests to namespaces that exist do not count. Brussle refuses a write, judgment, group or subscription that would create one more with
rate_limited(429) andRetry-After(the seconds until the next minute), and the SDKs wait and retry, up to their retry count. To create many namespaces at once (when you onboard many tenants, for example), create at most 1,000 a minute, or raise the SDK’smax_retries(maxRetries) so that each request can wait out enough minutes. default/quickstartholds at most 10,000 documents and 100 MB.
Deleting
DELETE /namespaces/{ns} deletes the namespace at once, so nothing in the namespace can be read when the call returns. A write to the same name then creates a new, empty namespace, and that creation counts toward the creation limit.
The delete also starts a namespace_delete job, which within 24 hours removes each document, answer and evaluation of the deleted namespace from storage, and removes the namespace’s name from its usage files. The amounts stay, so your bill does not change.
The delete cancels the namespace’s other open jobs (backfills and shadow reports, for example), with the error “the namespace was deleted”, and no part of these jobs carries over to the new namespace.
A write in flight when you delete has one of three results:
- It happened before the deletion, so it is gone with the namespace.
- It lands in the new namespace, and its response gives the revision and incarnation that the document has there.
- It arrives while the deletion finishes, and Brussle refuses it with
conflict(“the namespace is being deleted”).