Microservice Architecture 101
By Olivia Lam
Microservice architecture is an architectural style for the efficient and reliable design of applications by developers by utilizing a network of independent services called microservices. An example of this would be?containers , as the functionality of its services are independent of their environment.
The Main Components
Microservices ?are small, focused services that pertain to different tasks within an application. This breaking apart of an application into its individual pieces builds autonomy and efficiency within each service, allowing the app to be more flexible and lightweight. These services are the backbone of microservice architecture.
A client ?initializes the process, which is any various device employing the use of microservices such as search, configure, find, etc. The client then calls on an Application Programming Interface (API) Gateway to access the services instead of directly calling on them themselves. This allows the?API Gateway ?to evaluate and select the appropriate microservices, handle administrative tasks between client and microservices, and provide a secure transaction.
Service Discovery ?keeps track of the varying and numerous microservices that may be contained within the architecture. It distributes the workload evenly amongst the services and aids in adapting services to the chosen environment. This works with the service mesh in the same way that both direct communication amongst services.
Microservices also contain?private databases ?for their information, which allow any actions or implementations done by one microservice to come directly from its own database via its API.
领英推荐
Comparison to Monolithic Architecture
Monolithic architecture is the traditional style for applications, where their services, functions, and data, are all composed as one solid unit. All of its processes are managed and interconnected, so changes to one aspect of the application results in changes to the entire unit.
This way of developing applications is beneficial as it is easy to develop a single indivisible unit, to locate bugs and fix them, as well as distribute said unit. It has been deemed "old school" as it is not nearly as flexible and scalable as microservice architecture. Monolithic architecture does not have the same range, as more and more complex functions within a single application become difficult for the application to manage. It is also not as compatible as technology advances, because if a developer wants to scale one aspect of the architecture, they must scale all of it.
Pros and Cons
Microservice architecture also has its drawbacks as it is such a complex system of simultaneously working microservices, which can make testing, debugging, and developing much more arduous. However, its day-to-day use is so?much more efficient in maintenance and scalability ?due to each microservices’ independence from one another within the application. It also allows for a much simpler approach to developing as it breaks down an application into its own autonomous services in a "work smarter not harder" way.
Join the?WITI WINS UI/UX ?community
This is a wonderful explanation. I'm planning on sharing to my contacts hoping that others benefit from it. Thanks so much for the write-up Olivia.