Skip to main content

Large catalogs

Vox is built to hold millions of entities of a type, eg ten million products with their variants, prices and assets. Reads, background work and maintenance do bounded work at a time: a page, a batch or a transaction of a fixed size, so a larger catalog means more pages, not more memory or longer transactions. A few interactive operations are limited on purpose instead, since they're atomic or held in memory, and say so when they're exceeded.

Bounded work​

  • Reads are pages: entity and query pages are capped, deep browsing continues from where the previous page ended rather than skipping, and relations are read a batch of links at a time. See Querying and search.
  • Changes that reach many entities, eg renaming a category that a million products are in, are dispatched to what depends on them over several turns, while ordinary writes go on.
  • Deleting a context member, eg a language with values in every product, returns at once and its content is cleaned up a page at a time, see Contexts.
  • Deleting a subscription, or removing its maintained queries, empties its selection at once, and the stored rows are removed in the background a page at a time.
  • Retention removes history, the entity log, audit and bookkeeping a batch per transaction, see History and audit.
  • Model migrations rebuild storage and converge documents in batches, and a unique constraint added to a type with duplicates is checked again from its duplicates and what's written since, not the whole table.
  • Search indexes are backfilled in pages. While one is incomplete, Vox's own calculations, assessments and publications read the database, while applications read the index as it is.
  • Projection publications project a page of sources at a time, and a publication that publishes a document per combination of many members, eg per market and language, takes fewer sources per page, so a page holds about as many evaluations as one of a publication with a document per source while its builds take more pages. Members of keyed cells don't shrink the pages.
  • The work that follows a broad change, eg the change events, search indexing, assessment evaluations and subscription deliveries after a recalculation of 2,000,000 prices, is read from Vox's own outboxes in claimed batches, which every processing host shares, so adding a processing host adds throughput. A subscriber that can't be reached has at most one waiting delivery per entity, however many times the entities change. See Background work.
  • Scheduled times, eg 20,000 drafts that publish at 06:00, or 1,000,000 prices that become valid at midnight, are found through indexed due times, not kept as one timer per entity.

Deliberate limits​

WhatLimitInstead
A content release1,000 items, including the drafts within it, since it's published in one transactionImports for larger changes
The entities of other applications in a release with the same id10,000
An Excel export10,000 entitiesSubscriptions or projection publications for whole-catalog exports
Contexts of a type, eg languages or markets10,000
A query of a transient entity type, eg cartsOne condition or sort, answered by one indexQuery by the most selective condition and check the rest in code, see Queries

An operation over a limit is refused when it's attempted, with a message that names the limit, not halfway through or at publication. The exception is a release that got its items before its limit was lowered: it's refused when it's published, and can still be discarded. GET api/content-releases/limits returns the release limits, and the admin's release screen shows how many items a release has of its limit.

Following background work​

GET api/background-work returns how far the long-running background work has come, and the admin's Model screen shows it under Background work:

  • the dependency changes that wait to be dispatched, and the oldest of them, which tells the lag;
  • the cleanups of deleted context members and releases, at which step of all their steps, with the entities notified;
  • the items of content releases that are being changed after they arrived from another application;
  • the selections of deleted subscriptions that are being removed.

The loops that run the rest of the background work, eg search indexing, report their state as Nexus health checks, see monitoring.

Measuring​

Measure your own deployment at the sizes it will have, with its hardware and indexes, before relying on a time: the structural bounds hold at any size, the throughput doesn't. The profiler shows where the time of a slow import, recalculation or publication goes.