As the name implies, micro-services are small software components with specific objectives that are loosely coupled and easily maintained. A micro-service-based architecture demands that each micro-service is thoroughly tested and stable on its own, while the protocols and orchestration of the whole system are relatively simple and flexible. This way of developing helps to integrate more modules with little to no large-scale planning.
An Internet-based ecosystem demands reliability and fast troubleshooting
Nowadays 9 out of 10 developers must always assume that their app will be somehow connected to the Internet. This paradigm shift is new, as mobile devices with powerful operating systems quickly became the new rule; services provided through websites and apps became much more accessible. With increased accessibility, comes an increased demand for the service’s continuity, even more so if the user is paying for said service.
Amazon and Netflix constitute the golden standard for micro-service-based architectures. With millions of users worldwide and constant deployment of new services and functionalities, neither company can afford downtime. Coupling micro-services with continuous deployment allows them to coordinate dozens of teams without losing site availability.
How Amazon applies micro-services
In 2015, during a conference in Las Vegas, Amazon AWS senior manager Rob Brigham explained that about 20 years ago, the Amazon website was monolithic, with its components acting more like layers, being tightly wound with each other. He told the story of how difficult it was to merge the work of hundreds of developers (who didn’t talk much to each other) and somehow come up with a stable but massive master version of the service.
The solution was to simplify the process through scripting and automation. The result established the precedent for many of the tools that they currently offer in AWS. Methodically, they dissected the code and pulled out “functional units that served a single purpose.” Then, they designed web interfaces for each one. The process would go as deep as necessary, for example, allocating a whole module for the “simple” task of producing the correct tax amount at the time of checkout.
Amazon engineers studied how long it took to implement new functions. Without decoupling, they would take weeks. After migrating to microservices, the company managed to reduce dead hours; they introduced private repositories and continuous integration and the development team is now recognized as pioneers in this way of producing software.
Netflix’s need for micro-services
Netflix stores all their media files on a first group of cloud servers, another group then converts the original files to the ideal type and quality for the different devices where the Netflix app is available, plus adding piracy protection code to avoid forceful extraction of the files. Finally, the app decides which type of content to request from the server, depending on the user’s location and Internet connection speed.
This process takes place millions of times per hour, which makes downtime a serious issue. New shows and movies, categories and featured content always have some degree of development behind them. Furthermore, they integrate machine learning micro-services to show the best thumbnails for each type of user, of course, based on the type of content to be showcased. All these little details are stripped down to the most basic sets of functions for coding and testing; that way, it’s possible to seamlessly enjoy Netflix without ever noticing that it’s constantly being updated and improved.
On the verge of agile methodologies, micro-services were the obvious next step, as they emphasize small, manageable sets of features that can be fully relied upon even in the most demanding business environments. Micro-service-based architectures allow scalability and maintainability, two very necessary quality traits for any application or service aiming to cater to a global audience.