Engineering for MongoDB® databases

Flexible where it helps,
strict where it counts

We design and look after MongoDB® databases, with documents shaped by how your app reads them, rules on each collection and upgrades taken one version at a time, so each document keeps the shape your app expects.

Thanks, we’ll be in touch soon.

{{ heroStatus }}

You’re in good company

A few of the companies we’ve worked with.

When the documents no longer fit the app

MongoDB® is a document database. A deployment holds databases, and each database holds collections of documents: records made of fields, the named values in each, which can hold lists and other documents inside them. A replica set keeps copies of the data on several servers, one primary taking the writes and the others, its secondaries, following it.

Documents in one collection don’t have to share the same fields or types. So after a few years, a collection can hold documents written by every version of the app, with fields renamed, missing or of another type, and code that checks for each.

MongoDB® advises against lists that grow without limit inside a document, since they can strain resources and slow the indexes on them. Often some lists keep growing anyway, and some screens look up several collections for one page.

MongoDB® offers rules on each collection, which can either warn about a document that doesn’t fit or refuse it. So the real work is reshaping documents around how the app reads them now, with rules that keep them that way.

What we build

Documents shaped by how each screen reads them, rules that keep them in shape, and databases kept running and upgraded in order.

  • Set up to keep running

    A replica set on MongoDB® Atlas or on your own servers, the switch to a secondary rehearsed, backups restored to a separate deployment on a schedule, and how long each restore took written down.

  • Moved from the database you have now

    Data moved collection by collection, each result checked against the database you have now, and each app switched over once its results match; or moved between MongoDB® Atlas and your own servers.

  • Documents shaped by how they’re read

    Each collection designed from the screens that read it: what’s read together kept together, and lists that keep growing given a collection of their own.

  • Rules on each collection

    Validation rules added to collections that already hold older documents, set first to warn about what doesn’t fit, then to refuse it once those documents are fixed.

  • Queries that stay quick

    Indexes matched to the queries the app runs, the slowest found with the database profiler, their plans read, and indexes no query uses taken out.

  • Upgrades one version at a time

    Each major version in turn, each app’s driver, the library it connects with, checked first, and every step rehearsed on a copy.

  • Access kept to what each app needs

    Access control on, a user for each app with only the roles it needs, connections encrypted, and the network open only to the apps that use it.

  • Watched once it’s running

    Slow queries, how far each secondary lags behind the primary, disk growth, and alerts sent to the people who act on them.

  • AI where it helps

    Search by meaning, with the vectors kept in the documents they describe, using the vector search MongoDB® offers, where it answers a real question.

Stored the way each screen reads it

MongoDB® advises storing together the data that’s read together, so a document’s shape follows the way the app reads it.

A document can hold a list inside it, or point to documents kept in another collection.

A list that grows without limit inside a document strains resources and slows its indexes. The ways out MongoDB® describes: keep with the document only the part its page shows, with the rest in a collection of its own, or keep them apart and join them when they’re read.

So we start from the screens: what each one reads, how often, and what keeps growing.

Use the shop’s app on the phone: open every review, go back, or post a review, and see which documents each screen reads.

Waxed canvas totes at Tollhaven Goods

Waxed canvas tote

Latest reviews

  • {{ r.t }}

Every review

  • {{ r.t }}

and more with every review

Waxed canvas tote

The product’s document

  • Name
  • Details
  • The latest reviews
    • {{ r.t }}

Reviews, in their own collection

A small document for each review

  • {{ r.t }}

and more with every review

{{ shLine }}

One version at a time, each in two steps

MongoDB® releases new versions on a regular cadence, and publishes each major version’s end of life date ahead of time. Starting with the newest major version, a Feature Update release comes once a year between them, with the same end of life date as the major version it extends.

An upgrade goes one major version at a time, through each major release in turn. Each step has two parts: the new version on each member, the secondaries first and the primary last, then the feature compatibility version, the setting that turns on features that write data older versions can’t read. Until it’s raised, going back to the version before is still possible.

Each app’s driver has to work with the new version first. MongoDB® Atlas gives notice before a version’s end of life date, then upgrades the clusters still on it. After that date, a version gets no more fixes.

So we keep a list of each database’s version, its feature compatibility version and its end of life date, check each app’s driver first, and move each database one major version at a time ahead of that date, each step rehearsed on a copy, with the second part set only once the first has run well.

Start with one collection, and the screens that read it

The review covers how each database runs: on MongoDB® Atlas, MongoDB® Enterprise Advanced or MongoDB® Community Edition, as a replica set or a single server, sharded or not; each deployment’s version, its feature compatibility version and its end of life date; the drivers each app uses, and whether each works with the next version; the shapes of the documents in each busy collection, and the lists inside them that keep growing; the rules on each collection, and what they do with a document that doesn’t fit; indexes never used, indexes missing, and the slowest queries from the profiler, with their plans; the aggregation pipelines, the multi-step queries behind reports, that run often, and where they run; the replica set’s members, how far each secondary trails, and the read and write settings the apps use; shards and the shard key, where there are any; backups: how they’re taken, when one was last restored, and how long it took; access: whether access control is on, the users and roles each app has, encrypted connections and who can reach the network; and what’s monitored, who gets the alerts, and how fast the disk is filling.

The first step is one of these, tried on a copy first: one busy collection reshaped around the screen that reads it most; rules added to one collection, set to warn before they refuse; the slowest queries’ plans read, and their indexes fixed; the next major upgrade rehearsed, with every driver checked; or a restore to a separate deployment, timed.

What you receive is a written review and a proposal for that first step.

  1. Without a fixed schema, how do we keep the data right?

    Each collection can carry validation rules. We add them set to warn about a document that doesn’t fit while still accepting it, fix the documents they find, and only then set them to refuse what doesn’t fit.

  2. Which way of running it fits us?

    MongoDB, Inc. runs MongoDB® Atlas for you, in the cloud. MongoDB® Enterprise Advanced and MongoDB® Community Edition run on servers your team looks after. We’ll say which fits from what your team wants to run itself.

  3. Can it handle transactions across documents?

    Yes. A write to one document is all or nothing, even when it changes the lists and documents inside it, and transactions can cover several documents and collections. MongoDB® advises shaping the data so most writes touch one document, since transactions across several carry a cost, and we follow that.

  4. Why can’t we jump straight to the newest version?

    Each upgrade goes one major version at a time, and each step has two parts: the new version on every member, then the feature compatibility version. Until that second part is set, the step can still be undone, so we set it only once the first has run well.

  5. Some of our documents keep growing. What can we do?

    Keep with each document only what its page shows, and give the rest a collection of its own. We move them a part at a time, and the app reads both shapes while the move runs.

  6. What does it cost to work with you?

    That depends on the collections involved and the first step you choose. Before any work starts, you get a written proposal with the scope, the price or rate, and how you pay.

  7. Can we hire developers for our own team?

    Yes. Within 48 hours of your request, we introduce developers for MongoDB® databases, in your time zone, and you meet them before choosing who joins.

MongoDB® is a registered trademark of MongoDB, Inc. Webair is independent of MongoDB, Inc., and isn’t sponsored by, endorsed by or affiliated with it.

Let’s build it better

Tell us about the databases behind your apps, and the screens that read them most, and we’ll suggest where to begin, in a short call.

Thanks, we’ll be in touch soon.

{{ ctaStatus }}