Rutba
Start free

Blog · How we build

Forty-six apps from one image: how a release went from 38 minutes of builds to under 12

Every Rutba suite app used to be built and shipped as an image of its own: 46 builds, 38 minutes and 4.1 GB of nearly identical copies. Since 13 October they compile into one image in under twelve minutes and run in 14 containers instead of 46.

· 3 min read

Share this
One image fanning out to the storefront, the till and the sign-in, each running alone, and to eleven pools of related apps.
One build for all forty-six apps.

The Rutba business suite is 46 web apps: the till, the storefront, stock, orders, the books and the rest. Until this month each one was built and shipped as a container image of its own. A release meant 46 builds, one after another, taking 38 minutes and producing 4.1 GB of images that were nearly all the same web runtime copied 46 times. It worked, but it was slow and wasteful.

38 → 12 min

to build every app, 13 October

46 → 14

containers running them

1

image holding all 46 apps

One image for every app

Now every app is compiled in one build, three at a time, and their finished servers are merged into one tree with a single entry point. A container starts that image and is told which app to run, or which group of apps. The addresses, ports and routing in front of them did not change, so nobody using an app could tell the difference, except that releases got faster. The first full build took eleven minutes; the one live since 14 October took just under twelve, with all 46 apps in it.

Fourteen containers instead of forty-six

The apps now run in pools of similar apps, one pool per launcher category, in 14 containers instead of 46. Three run alone: the storefront, the till and the sign-in, because a pool restarts as a whole when one of its apps stops, and those three should never wait for a neighbour.

It is worth being precise about what that saved. Every app is still its own process, so the apps use about as much memory as before: 2,153 MB in 46 containers, 2,328 MB in 14. What fell was the overhead around them, from 53 container runtime processes using 783 MB to 21 using 328 MB, along with a great deal of disk. A setting puts every app back in a container of its own, from the same image, with no rebuild.

One troubling app does not hold back the rest

  • An app that will not build in the shared build is left out of it, not the image. It is then built on its own and runs from its own image, so one broken app never stops a release of the other 45.
  • A single app can be rebuilt and replaced between releases without touching the others, for an urgent fix.
  • The way back is one command. Each build keeps the image it replaced, and every app can be put back on it at once.

Once the new image had run cleanly in production, the 46 old per-app images were removed and the build caches cleared on all three servers. The same week, the eight containers of the old control plane, which the management Strapi had replaced, were retired as well.

The apps this builds

Every app in the suite, what it includes and what it depends on.

Browse the products

Read next

How we build

The sign-in service no longer has a database of its own

Rutba’s sign-in kept its own database: sessions, keys, second-factor challenges, an audit trail, and a second copy of everybody. Since 21 September it keeps nothing. Every record it needs lives in the one backend that already held people.

3 min read

Share this

One family

The rest of Rutba

One account across all of it. Sign in once and the products know each other.

PORTAL-BLOG-DETAIL · 7596826