4.micoservice Introduction
4.micoservice Introduction
Dr. T. Jemima Jebaseeli, Associate Professor, AI & ML, Karunya Institute of Technology and Sciences, Coimbatore
Microservices
Microservices architecture breaks down an application into a collection of
smaller, interconnected services.
Each service is focused on a specific business function and can be developed,
deployed, and scaled independently.
Can change parts of the application individually without interrupting the
structure of other software components because it is a distributed system.
These components ‘talk’ to each other using API’s so that the software can
work as one despite operating individually.
With microservice architecture, can have a complex and scalable application.
APIs (Application Programming Interface)
The word Application refers to any software with a distinct function.
Interface can be thought of as a contract of service between two applications.
This contract defines how the two communicate with each other using requests a
nd responses.
APIs are basically the middlemen of apps and web services, allowing different a
pplications to communicate with each other.
Allowing developers to create software applications that can interact with other
applications, services, or platforms.
Types of APIs
By use case:
1. Open APIs: publicly available APIs that anyone can use to access a company’s data
2. Internal APIs: APIs used within a company/organization to communicate information
between internal apps
3. Partner APIs: APIs designed specifically for third-party developers/partners, and are more
limited in access
By protocols:
1. REST API: a widely used architecture for building web services using HTTP methods like
GET, POST, PUT, and DELETE format to interact with data resources. REST APIs typically
return data in JSON or XML format
2. SOAP API: a messaging protocol used to exchange structured data between web services.
API Examples
Address Verification window at a local
pizza shop.
As you type in your address and click
Find Me, the address will be sent to G
oogle Map via the Google Map API.
Google Map will return the exact locati
on for the pizza shop so that the delive
ry driver knows where to bring the
pizzas to.
Microservices
Microservices allow large applications to be split into smaller pieces that operate independently.
Each ‘piece’ has its responsibilities and can carry them out regardless of what the other components
are doing.
A microservices-based application summons the collective services of these pieces to fulfill user
requests.
https://www.spiceworks.com/tech/devops/articles/what-are-microservices/
Microservices : Success Stories
Uber, eBay, SoundCloud, and Groupon — have gained significant performa
nce benefits and increased their profits by moving from monolith to microser
vices.
Netflix
After a major database corruption in August 2008, Netflix knew that its vertical data
structure wasn't viable anymore. Later that year, the company began to migrate to a new
cloud architecture via Amazon Web Services (AWS).
Overcoming numerous difficulties, over thirty IT teams were able to move the entire
operation to microservices by the end of 2011. In the process, they had to
simultaneously maintain two platforms, running both in-house and cloud servers.
Replicating data was one of the most challenging phases of the migration.
The streaming giant practically pioneered migration for the industry. Even though the
idea was initially met with a lot of skepticism, Netflix has been able to scale up
drastically. The company reached $24.9 billion in revenue in 2020.
Microservices
Zalando
Zalando is a European fashion technology company with over 16,000 employees as of 2021
. The first software system Zalando used in 2008 was based on Magento, an e-commerce
platform. The company quickly outgrew the potential of the platform and built its own
system in 2010 to accommodate increased loads.
After five years of constantly adding functionality and resources, Zalando's engineers
realized the system was becoming unsustainable. The huge monolithic codebase had
innumerable dependencies and produced bugs at an alarming rate. Maintaining the system
became incredibly difficult, and it stifled innovation. So, the company started transitioning
to microservices, choosing AWS as their cloud platform and Docker for deployment.
With over 200 microservices currently in use, over seventy different IT teams at Zalando do
a great job of synchronizing their work. The company's revenue has grown from 150 million
euros in 2010 to almost 8 billion euros in 2020.
D
D
Thank you