What is microservice architecture?

Updated at: Oct 01, 2019
By Gatefy

Microservice architecture for email protection

Microservice architecture exists to bring more efficiency to the development, deployment and, especially, operation of systems and software. Its goal is to make systems more flexible and scalable.

Unlike many people imagine, microservice architecture doesn’t refer to the size of the services that are part of it; but rather to the architecture itself. I mean, it relates more to how the system is thought and built.

Understanding containers and microservice architecture

To understand the microservices, you need to know what a container is. Trying to be as straightforward as possible, a container is an isolated and independent environment.

It can be a complete package, consisting of an application and all its parts, such as libraries and setting files. Or it can be used only to package the parts. That´s the developer's choice. So, yes, it’s possible to have multiple containers running isolated applications and processes inside a system. 

How microservice architecture works

Microservice architecture works based on containers. To build a system, the team works with a set of services. In the microservice architecture model, each service is deployed independently, within a container.

Basically, in a practical way, the microservice architecture allocates each system functionality within a container. And, then, it distributes the use of services according to the demand.

Why use microservice architecture

To answer this question, we’re going to give you an example provided by Gatefy. We use microservice architecture for email security, in our Secure Email Gateway.

Imagine a company that has three servers. Take a look at the image below to understand it clearly.
In this case, two of the servers have a database (DB) application. The databases are identical, redundant. Gatefy Cluster Engine (GCE) is responsible for meeting the software’s demands. It will define which DB will be used.

For example, if there are many users using the DB from server 1, GCE will respond to new requests redirecting them to server 3, so that the system remains fast and efficient.

In the same way, let's imagine that there was a storm and server 1 crashed. Immediately, the GCE will pass all the demand to server 3.

Now you can see why we use microservice architecture. It enables Gatefy and our customers to have:

• Availability. It’s not necessary to stop your whole system to change or include an application.

• Redundancy. Services will always be available because it’s easy and quick to change or include an application.

• Agility. Containers work fast. Uploading your applications becomes a matter of few seconds.

• Scalability and Flexibility. Create your applications in the way that suits you best.

• Simplicity. Reduce complexity and minimize time spent with deployment and system changes.