0% found this document useful (0 votes)
14 views

Microservice Architecture

The document discusses design principles for building cloud applications including using microservices, containerization, orchestration, tools like API gateways and service meshes, and practices such as immutable infrastructure, automation, security, and resilience.

Uploaded by

Harrold Lechuga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Microservice Architecture

The document discusses design principles for building cloud applications including using microservices, containerization, orchestration, tools like API gateways and service meshes, and practices such as immutable infrastructure, automation, security, and resilience.

Uploaded by

Harrold Lechuga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

It’s all about how you develop and deploy applications instead of where you are deploying the

application to — be it
public cloud or private data center. Application designed in this way can best make use of offers provided by the cloud.
The first step in that direction is building micro-service based applications and run them in containerized and orchestrated
platforms like Kubernetes.

Following are the design principals one should consider while creating Cloud applications.

Microservices
Applications are created as micro-service so one can make use of best language, frameworks and tools suitable for
different applications. Let’s say we can build real-time applications using Nodejs, REST applications using Spring-Boot or
Dropwizard and ML applications using python.

Containerization and Orchestration


Containerized application requires less resources then VMs and starts up in fraction of seconds. Containers packages
applications into small, lightweight execution environment which shares host operating system. Containers helps
isolating different micro services running in same host operating system. Docker has been used heavily for
containerization.
Containerized applications can be deployed using orchestration platform like Kubernetes which helps in container
management, application deployment, scaling which has become standard for cloud application deployment.

Tools

Service mesh

API gateway

Serverless architecture

Monitoring tools: with microservices spread across your on-premises and cloud infrastructure, being able to predict,
detect, and notify issues related to the health of the system is critical. There are several monitoring tools available, such as
New Relic, CloudWatch, Datadog, Prometheus, and Grafana.

Log consolidation tools: microservices can easily increase the number of deployment units by an order of magnitude. We
need tools to consolidate the log output from these components, with the ability to search, analyze, and generate alerts.
Popular tools in this space are Fluentd, Graylog, Splunk, and ELK (Elasticsearch, Logstash, Kibana).

Tracing tools: these tools can be used to instrument your microservices, and then produce, collect, and visualize runtime
tracing data that shows the calls across services. They help you to spot performance issues (and sometimes even help you
to understand the architecture). Examples of tracing tools are Zipkin, Jaeger, and AWS X-Ray.
DevOps: microservices work better when devs and ops teams communicate and collaborate more closely, from
infrastructure configuration to incident handling.

Blue-green deployment and canary releasing: these deployment strategies allow zero or near-zero downtime when
releasing a new version of a microservice, with a quick switchback in case of problems.

Infrastructure as Code (IaC): this practice enables minimal human interaction in the build-deploy cycle, which becomes
faster, less error-prone, and more auditable.

Continuous delivery: this is a required practice to shorten the commit-to-deploy interval yet keeping the quality of the
solutions. Traditional CI/CD tools include Jenkins, GitLab CI/CD, Bamboo, GoCD, CircleCI, and Spinnaker. More recently,
GitOps tools such as Weaveworks and Flux have been added to the landscape, combining CD and IaC.

Externalized configuration: this mechanism allows configuration properties to be stored outside the microservice
deployment unit and easily managed.

Immutable and Disposable Resources


Consider resources as disposable as opposed to traditional way of thinking of physical fixed servers in data center where
application used to be running.

Consider resources as immutable infrastructure where once application is deployed, it never gets updated instead new
resources are provisioned for each deployment which can greatly improves consistency of application
deployment/rollback.

Leverage Managed Services


There are many service offered by cloud which can be used by applications so instead of investing resources in setting up
that infrastructure in managing it, one can leverage managed services offered by different cloud providers.

Scared of vendor lock in ?

It’s trade off between operation cost of managing it and using managed services. You can always use many open source
managed services offered by cloud and for others you have to decide based on operational costs.

Scalability and Elasticity


Scalability is the ability to scale application without changing design and it achieved by scaling up and down whenever
required. Scalability leads to other principals like Stateless applications and Disposable resources.

Elasticity is the ability to use resource dynamically and all cloud providers offer it as pay as you go model. It solves
problem of over-provisioning of resources for applications deployed in traditional data center.

Stateless
Stateless applications maintain states outside of application in database or other external entity so nodes can be
added/removed dynamically and applications can be deployed without worrying about state. Application components also
should be stateless as stateless components can be easily scaled, repaired, rolled-back and load balanced. Scalability can
be achieved easily by designing stateless applications.

Loose Coupling
Loosely Coupled architecture reduces inter dependency between application components so one failed component does
not impact the whole application.

Service Discovery

Services registers themselves and discovered automatically by other services


Service endpoints do not need to be hardcoded in applications.

Asynchronous Communication

Decoupled components do not interact with each other directly


Communication between components happens using various message brokers like ActiveMq, SQS, etc..

Fault Tolerant and Resiliency


Application is fault tolerant means it should continue functioning in-spite of fault detected in one of the application
component. While Resiliency is about the ability to recover from failures to the operation state when it was before failure
so it’s all about responding to failures without any downtime and data loss.

Resiliency should be at the core of any architecture and you should practice it from the start when designing any
application.

Resilient applications offer High Availability and Disaster recovery using load balanced clusters, multi-region deployments,
replication, continuous monitoring.

Different ways to make application resilient:

Load balancing to avoid single point of failure


Retry intermittent failures
Circuit breaker to avoid cascading failures
Request throttling to avoid unavailability and DDOS attacks
Distributed transaction rollback using SAGA pattern

Security
Application component should communicate with each other using well defined authentication method without thinking
whether it’s internal service or external service to avoid any security vulnerability
Automation
Last but very very important is we should strive for automation in every part of application development, build,
deployment, monitoring, etc …

Infrastructure Automation

Infrastructure automation can be achieved by provisioning infrastructure using tools like Terraform, Serverless,
Cloudformation etc..

CI/CD Automation
CI/CD pipeline greatly reduces manual efforts and help in automating everything from build, test, package and
deployment. There are various tools like Jenkins, Spinnaker, Code pipeline, etc…

Auto Scaling
Automating scale up helps application availability during peak load and scale down reduces cost when application are not
used heavily. Sometimes you can scale down to 0 for internal applications which are used rarely to further reduce costs.

Monitoring
Centralized logging and monitoring greatly helps in maintaining services in healthy condition and it should be automated
using different tooling so if any issues can be detected quickly and fixed.

Backup
Have Automated backup solution in place so data can be recovered quickly without much loss of data.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy