Engineering practices · Infrastructure

Infrastructure practices.

Regions and clouds, CDN and storage, caching, tuned servers, databases, AI services, scheduled jobs, monitoring, staging, messaging and recovery: the layers under every platform we run, and how we look after each one.

Platform Infrastructure Layers

A visitor sees one page; underneath, a dozen layers decide whether it loads in a second, survives a sale day and comes back after a failure, and each one needs an owner.

Visitorbrowser · app · deviceEdge and CDNnearest locationMedia and storageimages, filesCachingpages, code, objectsWeb and app serversworkers, HTTP/2Databasestuned, local-onlyAI servicesvectors, models AND AROUND IT, EVERY DAYScheduled jobsthe night shiftMessagingmail, OTP, remindersMonitoring and logsmetrics, alertsStaging and releasestested copiesBackupsthree copiesRegions and clouds3 regions · 2 cloudsEvery layer has an owner, a number and a routine.Miss one, and the platform fails at that layer.
8servers we run
3compute regions
2clouds
7+CDN edge cities in front
Every nightscheduled maintenance before 4 am

Hosting and Isolation

Regions, clouds and how platforms are kept apart.

01

Multi-cloud Regional Footprint

Where a platform runs decides how fast it feels, which laws its data falls under, and whether one provider’s bad day becomes yours. A single region on a single cloud is simple until that region slows, fails or changes its prices. Our platforms run across three compute regions on two clouds, commerce, workflow and web in Bangalore, AI and vector search in Singapore, operations and on-demand GPUs in San Francisco, with storage in Mumbai and Singapore and a CDN in front.

San FranciscoCLOUD B· Operations· GPU model servers on demand BangaloreCLOUD B· Commerce, workflow, web· Staging copies of each SingaporeCLOUD A· AI apps, vector search· Object storage, also Mumbai CDN edge object storage
02

Platform Isolation

Unrelated platforms sharing one server share every failure. A traffic spike, a runaway job or a security issue on one becomes an outage on all, and none can be sized, patched or moved alone. Commerce, workflow, web, the AI application and the vector service each run on their own servers, with a separate staging server, so one can change without the others noticing.

Commercemany stores Workflowmany organisations Websitescontent, blogs AI applicationtests, issues Vector searchretrieval service OperationsGPU on demand spike stays hereStaging servera copy of each platform, tested before releasescale, patch, restart or move one platform without touching the others
Planning to scale or move a platform?

An engineer reviews where it runs today, how it is split and where it will break first as it grows.

Content Serving

Everything between a visitor’s tap and the database.

03

CDN and Object Storage

Images, scripts and files make up most of what a page downloads. Served from one distant application server, they make every page slow, every spike expensive and every server harder to replace. Files live in object storage and a CDN serves them from the location nearest each visitor, from Mumbai, Delhi and Chennai to Singapore, London, New York and Sydney.

MumbaivisitorEdgenearestChennaivisitorEdgenearestSingaporevisitorEdgenearestLondonvisitorEdgenearestNew YorkvisitorEdgenearestObject storageimages, files, themes · fetched onceApplication serversonly dynamic requestspages, carts, checkout
04

Media Pipeline

On a phone, images decide how fast a page feels and how it ranks. Badly handled images make pages heavy and make them jump as they load, which costs both sales and search position. Every image is converted to WebP in three sizes on upload, the browser picks the size it needs, images below the fold load as the visitor scrolls, and space is reserved so the layout never shifts.

Uploadany photo Small · WebP Medium · WebP Full · WebPPhonegets the small oneLaptopgets the full one space reservedloads on scroll
3sizes of every image, all WebP
5cache layers before the database
50application workers per pool
1 sa query slower than this is logged
05

Layered Caching

Caching is what keeps a sale-day spike off the slowest part of the platform. Without it every visitor repeats the same database work; done carelessly, it shows stale prices or someone else’s cart. We cache at five layers, CDN edge, page sections, compiled code, in-memory objects and the database buffer, while carts, checkout prices and anything personal are always computed fresh.

VisitorCDN edgeimages, files, themesPage cacheproduct, category, home sectionsCode cachecompiled code in memoryObject cachefrequent reads, in memoryDatabase bufferhot data kept in RAMDatabaseALWAYS FRESH· carts· checkout prices· stock at payment· anything personal
06

Application Server Tuning

Web servers and runtimes ship with defaults written for nobody in particular. On a real platform they either waste memory or run out of workers the moment traffic doubles, and requests queue until the site stops answering. Our servers run an event-driven web server with HTTP/2 and modern compression, worker pools sized to each server’s memory, compiled code kept in memory, and a lightweight proxy in front of the AI services.

RequestsHTTP/2 · compressedWeb serverevent-drivenWORKERS · UP TO 50 Compiled code in memorySized to the server’s RAMworkers grow with traffic, within what memory allows
Is your platform slow on its busiest days?

An engineer traces a page from the edge to the database and shows where the time goes.

Data and AI

Databases, search over vectors, and model servers that exist only when they are needed.

07

Database Tuning

The database is where most platforms slow down and where most data is lost. Untuned memory, unwatched slow queries and no way to rewind past a mistake all surface on the worst possible day. Our databases listen only inside their server, get a buffer sized to the machine, log every query slower than a second, and keep a binary log where point-in-time recovery is needed.

SERVER · DATABASE REACHABLE ONLY FROM INSIDEMemory buffersized to the machine · hot data in RAMSlow-query logevery query over 1 secondBinary logrewind to any momentDatabasefixed before users notice
08

Vector and Model Servers

AI features add infrastructure that a web platform does not have: a vector index, model services and expensive GPU servers. Done badly, answers go stale, costs climb by the hour or the AI feature slows the main platform. Vector search runs in containers on its own server, scheduled jobs add new and remove deleted records with a daily validation, and GPU servers are created for a workload and stopped when it is done.

Live databasesource of truthVector indexin containers · own serveradd newremove deletedDailyvalidationGPU MODEL SERVERS · ON DEMANDWorkload startsserver createdRunsmodels servedDoneserver stoppedpaid for by the hour it is used, not by the month

Daily Operations

The routines that keep a platform healthy long after launch.

09

Scheduled Maintenance

Platforms collect clutter every day: old records, bot sessions, growing logs, stale sitemaps and catalogues out of step with their feeds. Left alone, it slows the platform and quietly hurts search and sales. Jobs run every night while traffic is low, cleaning and compressing records at 1:00, removing bot traffic at 2:30, rebuilding sitemaps at 3:30 and syncing shopping feeds at 3:45, with cart reminders every two hours.

1:00clean andcompress records 2:30removebot traffic 3:30rebuild everystore’s sitemap 3:45sync catalogueswith shopping feeds☾ while traffic is lowALL DAY, EVERY 2 HOURSabandoned-cart reminders checked and sent
5night jobs before 4 am
2 habandoned-cart cycle, all day
3backup copies of every store
Monthlyrestore drill, in a set order
10

Monitoring and Logging

A platform watched only by its users has its problems reported by its customers. Without metrics and readable logs, a slow leak in memory, disk or query time becomes an outage with no warning. Every server reports its metrics, application performance monitoring traces slow requests to the code on the busiest platforms, uptime is checked on every store and admin, and logs are summarised and read every morning.

SERVER METRICSCPU Memory Disk UPTIME CHECKSevery store and adminApplication tracesslow requests foundDaily log summaryread every morningSlow queriesover 1 secondALERTS⚑ errors⚑ failed logins⚑ traffic spikes⚑ downtime
Want the people who built it to run it?

Managed operations by the engineers who designed the platform: monitoring, patching, backups and the night shift.

11

Staging Environments

Changes tested on a laptop or on the live platform are how releases break checkout on a Friday evening. When one codebase serves every tenant, a bad release reaches all of them at once. A staging server keeps a copy of each platform, every change is tried there first, and releases reach every tenant together from one codebase.

Changeone branchStaginga copy of each platformProductionone codebaseevery tenant on the same releasetried here first
12

Multi-channel Messaging

Order confirmations, OTPs, resets, approvals and alerts are infrastructure too. If they land in spam, arrive late or go to the wrong channel, customers cannot sign in or pay and teams miss approvals. Each platform routes messages by type: transactional email through dedicated delivery services with signed domains and bounce handling and a local relay that retries, OTPs to mobile, support on WhatsApp, team alerts to Slack and every message in-app, all sent from logged background jobs.

Order placedOTPApproval neededAlertMessage routerby type · loggedEmaildelivery services · relayMobileOTPsWhatsAppsupport, updatesSlackteam alertsIn-appnotificationsqueued · retriedsigned sender domainsbounces handledevery message: the right channel, sent in the background, logged
13

Recovery Sequencing

After a failure, the order of restoration decides when customers can buy again. Restoring everything at once means nothing works for hours, and the wrong order opens a store that cannot take money. Each platform has a restore order tested in a monthly drill, sign-in, then catalogue, then checkout and payments, then orders, then the rest.

1Sign-inpeople can log in 2Catalogueproducts visible 3Checkoutpayments work 4Ordershistory back 5The restreports, extrascustomers can buy again as early as possibletested in a monthly restore drill

Self-assessment Questions

Questions worth asking of any platform you run today.

  1. If your main region went down now, where would your platform run?
  2. Are your images and files served from your application server?
  3. What happens to your database when traffic triples on a sale day?
  4. Which of your queries take more than a second, and who knows?
  5. Do your OTPs and order emails land in spam?
  6. Is anything on your platform cleaned up automatically every night?
  7. Do you have a staging copy that matches production?
  8. In what order would you restore your platform after a failure?
Want an Independent Infrastructure Review of your platform?

An engineer reviews your regions, servers, caching, databases, backups and monitoring against the questions above, and gives you a prioritised plan.

Discuss a project

Share a short brief. If it is a fit, the next step is a call with one of our engineers.