Architecting your application to handle massive amounts of traffic

In the lifetime of an application, you sometimes get to a point where using a simple design architecture like the one we built isn't enough. As traffic keeps on increasing and you start seeing millions of users, you may need to start looking into changing parts of your architecture to make it more efficient. Ideally, you want to analyze your application and figure out which parts are hard to scale or hard to develop against and carve off those pieces of your monolith to create dedicated services. This is commonly called adopting a service-oriented architecture. This is, of course, a very complex and disruptive exercise, but the benefits offset those inconveniences.

From an architecture/operations standpoint, breaking out services in the manner described will allow for:

  • Better reusability of the service as other applications will now be able to use that service
  • Better reliability as the breakaway service will act as a stand-alone service and therefore won't depend on other issues in the code base
  • Better scalability as you can scale each service independently making sure that you use an optimal amount of resources

For developers:

  • Having multiple services makes the code base for each service smaller, making it easy to navigate through the code and onboard new developers.
  • Each service can be rewritten in a language that's more suitable for the tasks being performed.
  • Starting fresh will also help with developer productivity as you won't have as much legacy code to handle.

As mentioned, the migration to a service-oriented architecture is not easy, but thankfully, using AWS helps a lot as you can rely on a number of services to handle most of the pain points associated with using a service-oriented architecture.

Aside from the obvious things such as the fact that you will now have to manage and deploy a number of services, one of the difficulties associated with a service-oriented architecture is that you now have to handle the service-to-service communication. In order to handle that, the first services you can turn to are the two load balancer services, ELB and Application Load Balancer (ALB).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset