Friday, 10 April 2020

Microservices

I am categorizing the microservices as two ways
1) Developing Microservices
2) Deploying Microservices

Small overview about the Docker:

Container like similar feature of Virtual Machine. Containers are not meant to host an operating system.

Let us start with a host with Docker installed on it.This host has a set of its own processes running such as a number of operating system processes,The docker daemon itself, the ssh server etc.

docker run ubuntu sleep 3600, We will now run an Ubuntu Docker container that runs a process that sleeps for an hour.

We have learned that unlike virtual machines containers are not completely isolated from their host.Containers and the host shared the same kernel.Containers are isolated using Namespaces in Linux. The host has a Namespace and the containers have their own Namespace.

Below Container with processes like process of db,analysis, computation etc.
Containers are meant to run a specific task or process such as to host an instance of a web server or application server or a database or simply to carry out some kind of computation or analysis.

Once the task is complete the container exits. The container only lives as long as the process inside it is alive.If the web service is inside the container is stopped or crashes, the container exits.

Microservices Logging Mechanism:
1st Style : Consolidated Logging Style.
2nd Style: Log Streaming

1st Style : Consolidated Logging Style:
Containers such as Docker are ephemeral (lasting for only a short time).This essentially means
that one cannot rely on the persistent state of the disk.Logs written to the disk are lost once the container is stopped and restarted.Therefore,we cannot rely on the local machine's disk to write
log files.

I will keep on update this topic when I will have time.

No comments:

Post a Comment