0% found this document useful (0 votes)
2K views

Microservices Architecture and Case Study On Netflix Implementation

The document provides an outline for a research paper on microservices and Netflix's adoption of microservices. It discusses microservice architecture, how it scales applications, categories of microservices, composition patterns, and Netflix's journey to migrating to microservices. Netflix broke its monolithic architecture into independent services for improved innovation, reliability, and efficiency.

Uploaded by

Binod Aryal
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

Microservices Architecture and Case Study On Netflix Implementation

The document provides an outline for a research paper on microservices and Netflix's adoption of microservices. It discusses microservice architecture, how it scales applications, categories of microservices, composition patterns, and Netflix's journey to migrating to microservices. Netflix broke its monolithic architecture into independent services for improved innovation, reliability, and efficiency.

Uploaded by

Binod Aryal
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 60

Research Based Term Paper

On:
Microservices and Adopting
Microservices at Netflix
MBA-IT 4th Batch
Binod Aryal
Deshant Shrestha
Siddhartha Subedi
OUTLINE
• Introduction
• Microservice Architecture – Scaling
• Microservice Architecture – Blueprint
• Categories of Services in MSA
• Composition Patterns
• CASE STUDY: Adopting Microservices at Netflix
• Conclusion and Recommendation
Objective of the study
• Understand Monolithic Vs. Microservices Architecture
• How microservices can help improve the business efficiency
• How Netflix adopted the Microservices architecture
• What benefits Netflix has after using the service
• Understanding Microservices in the Cloud
Introduction
• Microservice is a service-based application development
methodology. In this methodology, big applications will be divided
into smallest independent service units.
• Microservice is the process of implementing Service-oriented
Architecture (SOA) by dividing the entire application as a collection of
interconnected services, where each service will serve only one
business need.
Methodology
• The design science research methodology of microservice
architecture is used.
• The research is based on reviewing the Scientifics research (IEEE) and
articles.
• The case study is based on Netflix tech blog, video records of
conference hosted by Netflix.(infoQ)
The Concept of Going Micro
SOA and Microservices
• In a service-oriented architecture, entire software packages will be
sub-divided into small, interconnected business units. Each of these
small business units will communicate to each other using different
protocols to deliver successful business to the client.
• SOA is a designing pattern and Microservice is an implementation
methodology to implement SOA or we can say Microservice is a type
of SOA.
MSA Architecture
Advantages
 
• Small in size: Basically, a service should not perform more than one business task, hence it will be
obviously small in size and easy to maintain than any other monolithic application.
• Focused: As mentioned earlier, each microservice is designed to deliver only one business task.
• Autonomous: Each microservice should be an autonomous business unit of the entire application.
• Technology heterogeneity: Microservice supports different technologies to communicate with
each other in one business unit, which helps the developers to use the correct technology at the
correct place.
• Resilience(Fault isolation): Microservice follows high level of resilience in building methodology,
hence whenever one unit fails it does not impact the entire business.
• Ease of deployment: As the entire application is sub-divided into small piece of units, all of them
can be deployed in any environment very easily with less time complexity unlike other monolithic
applications of the same kind.
Disadvantages

• Distributed system: Due to technical heterogeneity, different technologies will be used to


develop different parts of a microservice. A huge set of skilled professionals are required to
support this big heterogeneous distributed software. Hence, distributed and heterogeneity
stands as a number one disadvantage of using microservice.

• Cost: Microservice is costly, as you have to maintain different server space for different
business tasks.

• Enterprise readiness: Microservice architecture can be considered as a conglomerate of


different technologies, as technology is evolving day-by-day. Hence, it is quite difficult to make
a microservice application enterprise ready to compare to conventional software
development model.
Microservice Architecture –Scaling
• Scaling is a process of breaking down a software in different units
• It helps to improve security, durability, and maintainability of the
application
• There are three types of scaling procedures that is followed in the
industries :
1. X-Axis Scaling
2. Y-Axis Scaling
3. Z-Axis Scaling
X-Axis Scaling
• X-axis scaling is also called as horizontal scaling.
• The entire application is sub-divided into different horizontal parts.
• Basically, monolithic applications follow this scaling method.
Y-Axis Scaling
• Y-axis scaling is also called as a vertical scaling that includes any
resource level scaling and scaling is done by splitting different things.
• Any DBaaS or Hadoop system can be considered to be Y-axis scaled.
• In this type of scaling, the users request is redirected and restricted by
implementing some logic
Z-Axis Scaling
• Z-axis splits are commonly used to scale databases using data
partitioning.
• Scaling is done by splitting similar things.
• It improves cache utilization and reduces memory usage and I/O
traffic.
• It is used for routing each request to the appropriate server.
• It also improves transaction scalability since requests are typically
distributed across multiple servers.
Categories of Services for MSA
• Platform as a Service [PaaS]
• Software as a Service [SaaS]
• Infrastructure as a Service [IaaS]
• Data as a Service [DaaS]
• Back End as a Service [BaaS]
Example of a microservice architecture
MSA – COMPOSITION PATTERNS

Aggregator Pattern

The "Aggregator" is responsible for calling


different services one by one.
MSA – COMPOSITION PATTERNS

Proxy Pattern

Proxy service may call different services


individually. We can build one level of
extra security by providing a dump proxy
layer
MSA – COMPOSITION PATTERNS

Branch Microservice Pattern


The client can directly communicate with the
service. Also, one service can communicate
with more than one services at a time.
MSA – COMPOSITION PATTERNS

Chained Pattern
We will allow the client to communicate
directly with the services and all the services
will be chained up in a such a manner that the
output of one service will be the input of the
next service
MSA – COMPOSITION PATTERNS

Shared Resource Pattern


The client or the load balancer will directly
communicate with each service whenever
necessary
MSA on Cloud
Serverless Microservices
Auditing and remediation
CASE STUDY:
Adopting Microservices at
Netflix
Netflix is the world’s leading Internet television network
with over 183 million members in over 190 countries
enjoying more than 125 million hours of TV shows and
movies per day, including original series, documentaries
and feature films.
Netflix runs on microservices
What microservices are not
What is a microservice?
…the microservice architectural style is an approach to developing a
single application as a suite of small services, each running in its own
process and communicating with lightweight mechanisms, often an
HTTP resource API.

- Martin Fowler
Netflix journey to
microservices
Netflix took 7 years

https://media.netflix.com/en/company-blog/completing-the-netflix-cloud-migration
Data Center - Monolith

RDBMS
August 2008
First Principles
Buy vs. Build
● Use or contribute to OSS technologies first

● Only build what you have to


Services should be stateless*
● Must not rely on sticky sessions

● Prove by Chaos testing

*Except the Persistence / Caching layers


Scale out vs. scale up
● If you keep scaling up, you’ll hit a limit

● Horizontal scaling gives you a longer runway


Redundancy and Isolation
For Resiliency
● Make more than one of anything

● Isolate the blast radius for any given failure


Automate destructive testing
● Simian Army

● Started with Chaos Monkey


First Principles
In Action
Stateless services

Service A

Service B Service B Service B Service B Service B


Data – from RDBMS to Cassandra
● NoSQL at scale
● Open Source
● Multi-Regional
● Multi-directional

● Available
● Partition Tolerance
● Tunable Consistency*
Multi-Regional Replication
Zone Zone
B B
500ms

Zone Zone Zone Zone


A B A B
Client
Client

Zone Local Quorum Zone Zone Zone


(Typical)
A C A C
Zone Zone
C C

Bi-directional
Region A Region B
Nightly compare & repair
Last, but not least - Billing
Microservices –
Benefits
Netflix Priorities
3. Efficiency

1. Innovation 2. Reliability
Innovation:
tight coupling doesn’t work

Develop
• Team A
• Team B
• Team C
Tes Release
• … t
Innovation: Loose coupling
• Develop, Test,
Team A Deploy, Support

• Develop, Test,

Team B Deploy, Support

• Develop, Test,
Deploy, Support
Team C
Support Architect

Run Design

End-end
ownership
Deploy Develop

Tes Review
t
End-end ownership + velocity
Support Architect Support Architect
Support Architect Support Architect

Run Design Run Design


Run Design Run Design

Deploy Develop Deploy Develop


Deploy Develop Deploy Develop

Test Review Test Review


Test Review Test Review

Support Architect Support Architect


Support Architect Support Architect

Run Design Run Design


Run Design Run Design

Deploy Develop Deploy Develop


Deploy Develop Deploy Develop

Test Review Test Review


Test Review Test Review

Support Architect Support Architect


Support Architect Support Architect

Run Design Run Design


Run Design Run Design

Deploy Develop Deploy Develop


Deploy Develop Deploy Develop

Test Review Test Review


Test Review Test Review
Separation of concerns
UI Feature A Feature B Feature C

Personalization Feature D A/B Test E


Leverage

A/B
Mid-tier Feature H
Test F

Infrastructure Availability Scalability Security


Edge Middle Tier & Platform
Zuul

EVCache

ELB

API

Cassandra

Playback
Reliability Matters
● Netflix strive for 4 9’s (99.999%) of availability

● That leaves only 52 minutes of downtime per YEAR


Case Wrap up
Microservices bring great value to development
velocity, availability and other dimensions
Microservices at scale require organizational
change and centralized infrastructure investment
MSA: Conclusion
Microservices - also known as the microservice architecture - is an
architectural style that structures an application as a collection of services
that are
• Highly maintainable and testable
• Loosely coupled
• Independently deployable
• Organized around business capabilities
• Owned by a small team
The microservice architecture enables the rapid, frequent and reliable
delivery of large, complex applications. It also enables an organization to
evolve its technology stack.
MSA: Conclusion(Cont.)
This solution has a number of drawbacks:
• Developers must deal with the additional complexity of creating a
distributed system:
o Developers must implement the inter-service communication mechanism and
deal with partial failure
o Implementing requests that span multiple services is more difficult
o Testing the interactions between services is more difficult
o Implementing requests that span multiple services requires careful
coordination between the teams
o Developer tools/IDEs are oriented on building monolithic applications and
don’t provide explicit support for developing distributed applications.
MSA: Conclusion(Drawbacks Cont.)
• Deployment complexity. In production, there is also the operational
complexity of deploying and managing a system comprised of many
different services.
• Increased memory consumption. The microservice architecture
replaces N monolithic application instances with NxM services
instances. If each service runs in its own JVM (or equivalent), which is
usually necessary to isolate the instances, then there is the overhead
of M times as many JVM runtimes. Moreover, if each service runs on
its own VM (e.g. EC2 instance), as is the case at Netflix, the overhead
is even higher.
Questions?

Binod
Deshant
Siddhartha

You might also like