microservices and routing explained: how a request finds the right server
Stacks · 13 min read · posted Nov 23, 2026, 11:20 pm
A big software company doesn't run one app. It runs thousands of small programs called services, with copies of each in data centres around the world. Every time a request needs one of them, something has to decide which copy gets it. That decision is called routing, and it was my intern project at Atlassian.
This is the longer version of my video. It takes the ideas in the order the video raised them and goes one level deeper on each. The project section near the end is still a work in progress.
One thing before the rest. I can't describe Atlassian's internal systems, and I'm not going to. Everything here is general knowledge about how the industry does this, or it's already public, and where it's public I link the source. The only thing I say about my own project is what's on my CV.
one app, or many services
The simplest way to build software is as one program. Login, search, billing and email all live in the same codebase and run as a single process. That's called a monolith.
The other way is to split it. Each job becomes its own small program, called a service, and the services talk to each other over the network. That style is called microservices.
+----------------------------+
| ONE APP |
| login search email |
| billing and the rest |
+----------------------------+
broken down
+-------+ +--------+ +-------+
| login | | search | | email |
+-------+ +--------+ +-------+
+---------+ +------+ +-------+
| billing | | ... | | ... |
+---------+ +------+ +-------+
The definition most people still point to is from Martin Fowler and James Lewis in 2014: an application built as "a suite of small services, each running in its own process and communicating with lightweight mechanisms".
Atlassian sits at the far end of this. Its engineering blog said in November 2025 that its internal platform hosts "2000+ services" with "5000+ deployments daily".
The reason to split isn't speed. A monolith is usually the faster design, because everything is in one place. The reason is people. When hundreds of engineers share one program, every release waits until everyone's changes are ready at the same time. Split it up and each team ships its own piece on its own schedule.
monorepo is a different question
Monorepo is the word that gets tangled up with all this. It sounds like the opposite of microservices. It isn't, because it answers a different question.
A repo (repository) is where code is stored. A monorepo is one repository that holds the code for many projects. That's a choice about storage. Monolith or microservices is a choice about how the software runs. You can answer the two separately.
runs as runs as
one many
program services
one repo where google
most
apps start
many repos unusual common at
big companies
Google is the well-known case of one repo and many services. In a 2016 paper, its engineers described a single repository of about two billion lines of code, worked on by more than 25,000 developers.
So "monorepo or microservices" isn't a real choice. A company can use both, and plenty do.
calling a service
In the video I say you call a service the same way you would call a function. That's true of how the code reads.
ok = password_checker(pw)
That line could be a function sitting in the same file. It could also be a request to a program in another country. Making a network request look like a function is an old idea called a remote procedure call, or RPC, and the tooling for it is very good at hiding the difference.
What happens underneath is not the same thing at all.
FUNCTION CALL
your code --> function
same program, same machine
takes nanoseconds
works unless the whole
program is already down
SERVICE CALL
your code ~~network~~> service
another program, maybe
another country
takes milliseconds
can fail while your code
is perfectly fine
I timed both on my laptop. A Python function that checks a password's length took about 33 nanoseconds a call. Then I called a service that does nothing except reply, running in a container on the same laptop, through a proxy: 0.88 milliseconds. That's roughly 27,000 times longer, and the request never left the machine. Move the service to Sydney and call it from Auckland and one round trip is about 31 milliseconds (measured further down). That's close to a million times the function call.
Speed is the smaller problem. A function call either happens or your whole program is already dead. A network call has more ways to go wrong. It can be slow. It can fail outright. It can succeed without the answer ever making it back, so you can't tell if it happened. It can also land on a copy of the service that's overloaded while a healthy copy sits idle.
Engineers keep a list of the assumptions that cause this, called the fallacies of distributed computing. The first two are "the network is reliable" and "latency is zero". Writing a service call as if it were a function call quietly assumes both.
Everything in the rest of this guide exists because of that gap.
one service, one team
In the video I describe a service called password checker with more than 15 engineers looking after it. I made that one up as an example. The pattern behind it is real: at a big company a service normally belongs to one team. That team writes it and deploys it, and when it breaks at 3am they're the ones who get the call. Amazon's name for this is the two-pizza team: no team bigger than two pizzas can feed, each with ownership of one product or service.
The payoff is independence. The password team can ship ten times a day without asking the search team, as long as the way other services call it (its API) stays the same. The cost shows up when a feature touches five services. Now five teams have to agree on it.
containers and the cloud
A service has to run somewhere. Two ideas cover most of how that works now.
Containers. A container is a package that holds a program together with everything it needs to run, so it behaves the same on a laptop as it does on a server. Docker is the tool that made them mainstream. Docker's own description is "a standard unit of software that packages up code and all its dependencies".
The cloud. Cloud infrastructure means renting computers from a company like AWS (Amazon Web Services) by the hour or by the second, in place of buying your own. You ask for a machine through an API and it exists a minute later.
Put the two together and you get scaling. When demand goes up, start more copies of the container. When it drops, shut some down.
demand quiet peak night
copies [][] [][][][] []
Renting means paying for what's running. A service that needs 40 copies at midday and 5 at 3am only pays for 40 at midday. That's the "reducing our total bill" line in the video. It only saves money if the scaling down really happens.
regions and latency
Cloud providers group their data centres into regions, one for each part of the world they cover: Sydney, Singapore, Frankfurt, Oregon, Northern Virginia and so on.
Companies run copies of the same service in several regions for two reasons. If one region has an outage, the others keep answering. And the closer a copy is to the customer, the sooner it responds.
That delay has a name. Latency is the time between sending a request and getting the response, measured in milliseconds (ms). A lot of it is plain distance. Signals in fibre travel at roughly two thirds of the speed of light, so a request from Auckland to the east coast of the US has a floor that no code can get under.
I measured it from my desk in Auckland: the time for one round trip to AWS's public endpoint in each region.
from auckland, one round trip
median of 7, 23 nov 2026
new zealand 7 ms
sydney 31 ms
singapore 123 ms
oregon 141 ms
virginia 204 ms
frankfurt 286 ms
(That's curl's connect time minus the DNS lookup, against dynamodb.<region>.amazonaws.com. The first row is AWS's New Zealand region, which opened in September 2025.)
One request usually needs several round trips before any data comes back, because a new connection has to be opened and encrypted before the request itself is sent. I measured that too. A brand new HTTPS request got its first byte back from Sydney in 103 ms. From Virginia it took 618 ms.
The numbers on the map in my video (38ms to Sydney, 180ms across the Pacific) were examples made up for the animation. The real ones tell the same story.
routing
So there are copies of one service in several regions, and a request that needs one of them. Routing is the decision about which copy it goes to.
region A
/ \
you -- -- the service
\ /
region B
via A 290 ms
via B 190 ms <- least latency
(example numbers, as in the video)
There are a few standard ways to make that decision, and each has a catch.
Nearest on the map. Send the request to the closest region. It's cheap and usually right. It's wrong on the day the nearest region is the one in trouble.
Lowest measured latency. Keep records of how long each region takes to answer from each part of the world, then pick the lowest. AWS offers this in its DNS service as latency-based routing. Those records are measurements taken over a period of time, so they say nothing certain about the request in front of you. Some proxies measure it live. Linkerd, a service mesh, sends requests to the fastest endpoints by default.
Skip the unhealthy. Every copy gets probed on a timer, and one that fails the probe stops receiving traffic. The gap here is that a copy can pass a simple health check and still be slow for real requests.
Fallback. Give each attempt a time budget. If the preferred copy hasn't answered inside it, send the request to the next copy before the user notices anything. The catch is that retries add load at the exact moment something is already struggling. Choosing the budget is the hard part too. Set it too low and you abandon healthy copies during a normal blip. Set it too high and people sit through the wait.
Real systems stack several of these. Routing also happens at more than one level. DNS decides which region your device talks to in the first place. A load balancer inside that region then picks a machine. The same question comes up again every time one service calls another.
how it's done in practice
Nobody wants every team writing its own timeout and retry code inside every service, in every programming language the company uses. So the industry moved that logic out of the services and into a proxy.
A proxy is a program that sits in the path of a request and passes it along, making decisions on the way. The one this section is about is Envoy, which is open source and was first built at Lyft.
A sidecar is a helper program that runs right beside a main one, like the sidecar on a motorbike. In the most common use of the word, the proxy is the sidecar. Every service gets its own Envoy next to it, and all of that service's traffic goes through it.
+----------------------+
| machine 1 |
| service A |
| | |
| [ envoy ] sidecar |
+-------|--------------+
| network
+-------|--------------+
| machine 2 |
| [ envoy ] sidecar |
| | |
| service B |
+----------------------+
Service A's code says "call service B" and nothing more. Its sidecar decides which copy of B gets the call and what happens if that copy doesn't answer.
Atlassian has described this publicly. A 2021 post on its engineering blog says its service proxy is "implemented as containers that are deployed alongside your Micros service or application, referred to as a 'sidecar'", built as "a low-latency, small-footprint proxy for all internal REST APIs calls". (Micros is the name of its internal platform.)
A service mesh is what you have once every service has a proxy and one central system, called the control plane, hands all of them their rules. Change a rule in one place and every proxy picks it up.
Layer 7 is networking shorthand. Network traffic is described in layers, and the number says how much of a request a device understands. A layer 4 device sees addresses and ports. A layer 7 proxy reads the request itself, including the URL and the headers (small labelled notes attached to every request). So a layer 7 rule can say "requests carrying this header go to that copy". Header manipulation is the proxy adding or rewriting those notes as the request passes through.
A tenant is one customer of a shared system. A tenanted service keeps each customer's data separate, often in a specific region, which means a request for that customer can't go to just any copy. Atlassian's public architecture page describes its edge (the front door, where requests arrive from the internet) doing exactly this: it "determines where your product data is located" and "forwards the request to the target region".
That's all the vocabulary needed for the lines on my CV. I used Go and Envoy proxy sidecars to build a new layer 7 routing strategy for tenanted microservices, with latency fallback and header manipulation at the service mesh layer. It was adopted across more than 1,000 internal services.
That's where I stop. How those pieces fit together inside Atlassian isn't mine to publish.
the project (work in progress)
This section isn't finished. I'm still working on the project write-up, and I'll add it here when it's ready.
what it was like
I interned at Atlassian over a summer, on a team of senior and principal engineers. The first few weeks went on learning before I wrote any code, and the sections above are most of what I was learning.
Part two of the video picks up from here. I'll link it when it's out.
where to go next
- "I was laid off by Atlassian" by Vasilios Syrakis. Forty minutes on what he built there, most of it the Envoy platform at Atlassian's front door. More from him on his channel.
- What is Envoy, the first page of the official docs. Two pages to read after it: priority levels, which is how a proxy prefers one copy and fails over to the next, and outlier detection, which is how it benches a copy that keeps failing.
- What's a service mesh? And why do I need one? by William Morgan, a plain-language introduction from 2017.
- Microservices by Martin Fowler and James Lewis, for the full definition, and MonolithFirst for the argument against starting with them.
- Why Google Stores Billions of Lines of Code in a Single Repository, the monorepo paper.
what i'd word differently in the video
A minute of video rounds things off. Six places where the careful version is different.
I said two million people saw his video "exposing the company". That's the wrong word for it. Vasilios Syrakis was a senior systems engineer at Atlassian for about eight years, and his video is a walkthrough of what he built there. In the first minute he says he wants to talk about "the things that I personally found interesting or that I'm proud of".
"The same architecture as him" needs narrowing. His video covers the Envoy platform he spent years building at Atlassian. My project ran on Envoy too, in a different part of the system. I was there for one summer as an intern.
"The same way you would call a function" is true of how the code reads. Underneath it's a request over a network, with everything that brings. The edit puts a small line under it saying so.
"Finding the least latency path around these regions" is the goal in one line. It leaves out what happens when the fastest copy stops being the fastest, which is the fallback. It also leaves out tenancy, where a customer's request can't go to just any region.
Every region name and millisecond figure in the animations (38ms, 180ms, 290ms, 190ms) was an example, and labelled as one. The password checker and its 15 engineers were an example too. The measured numbers are the ones in this guide.
"Last summer" means a southern hemisphere summer, the one that runs over the new year.
honest limitations
Microservices are expensive. Every arrow in these diagrams is a network call that can fail, and making that survivable takes a fleet of proxies and people on call to run them. A small team is almost always better off with one app. Martin Fowler's observation, which he calls tentative, is that almost all the successful microservice stories started as a monolith that got too big and was broken up. It goes the other way too. In 2023 a team at Amazon's Prime Video wrote that moving one of their services back to a monolith cut its infrastructure cost by over 90%. The original is no longer on Amazon's site, so the link is to the archived copy.
A mesh is more machinery again. Each proxy is one more hop for every request and one more program that can be misconfigured. A bad rule pushed from the control plane reaches every service at once.
Fallback can make an outage worse. If a region is slow because it's overloaded, and every caller retries somewhere else, the overload moves with them. Real systems cap retries for that reason.
The latency table is one desk on one evening. Yours will be different, and so will mine tomorrow.