Part 4
Scaling the System at AR - Part 4 - Message Queue at AR
The problem of scaling team
As the product grows bigger and bigger, one team is not capable for developing and maintaining the
whole system anymore. The organization won’t scale if we operate
using a top-down style, where one Production Owner or Tech Leader dictates the decision of all
teams. Sooner or later it will come a big monolith application, where the changes from one place can
cause cascading effect to all the other teams.
The philosophy that we use for scaling the product is to split it into smaller
ones, building multiple autonomous teams, each team is responsible for one (or more) business
domain. Each individual team is free to experiment new technology and choose the tech stack that is
most suitable for them without impacting the other teams.
There are, of course, plenty of difficulties when splitting team
- How to make those teams operate independently?
- How can we make sure the error in one team doesn’t cause cascading effect to the other team?
- How does one team access the data that another team manages?
- How does one team update the data that belongs to another team?
- How can one team encapsulate the underlying business logic from the other teams?
- How do we maintain the consistency across teams?
- What will happen if we add one (or more team) in the future?
- …
I won’t talk much about the process, operating or management skill here, just because I’m not an
expert on that. I will just show some technical techniques related to Message Queue that we used to
support the ultimate goal of splitting and building small autonomous teams.
How about an API Server for each team?
One simple way that people usually think of is to expose an API Server/Gateway to the other teams in
the company. An API Server can help
- Limit the permission of other teams/services on the current team resources, allow the other teams
to read/write certain entities only.
- Prevent the other teams to cause unwanted effect on the internal data structure of the current
team.
- Abstract away the complex underlying business logic of the team.
- Each team can choose its own technology stack, no matter if they follow a Monolith or Microservice
design, no matter if they use Nodejs or C#, as long as the API is a standard one (usually HTTP API).
Read more