In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article analyzes "what's the difference between micro-services and API". The content is detailed and easy to understand. Friends who are interested in "what's the difference between micro services and API" can follow the editor's train of thought to read it. I hope it will be helpful to you after reading. Let's follow the editor to learn more about "what's the difference between micro services and API".
Microservice is a small, single service provided by a company. It comes from a distributed computing architecture that connects many small services rather than a large one. Microservices can be delivered through the application programming interface (API).
API is a method of communication between the requester and the host, which can usually be accessed through the IP address. API can convey many types of information to users, such as:
Functions to be provided by the data to be shared
In short, talking about microservices must do more with the architecture of the software, while API has to do with how to expose microservices to consumers.
How does microservice work?
Micro-service is an extension of the company's idea of a large single service. A microservice is a single function. If Microsoft Word is split into microservices, there may be a service provided as blank paper, a service as a spell checker, and a service as a formatting tool.
Kubernetes allows computer software to make adjustments. Kubernetes has its own advantages, and it also promotes software design from a single service as a whole to a collection of many small services that work together. These processes are precisely because Kubernetes is designed to do:
Effectively coordinate the use of a single container on the server to improve system reliability and scalability and reduce related management and resource costs
Examples of microservices
Microservices are very simple. Simplicity is the main goal. You can think of them as roles in the company. A microservice plays a very special role and does only one job. DZone brings together excellent diagrams of the various micro services provided by Uber, which communicate with each other and perform different tasks through API. Uber builds different services for each task:
Passenger management passenger web interface invoice management driver management driver Web UI payment management travel management notification
Microservices can also be illustrated by architecture diagrams, where one microservice is a single node that communicates with another service through API. As more services are added to the system, the architecture can grow. It is conceivable that the micro-service architecture diagram of a large company may be as large as a small city. The following are hypothetical Amazon and Netflix graphics:
Micro services depend on API
API is a communication tool that enables one service to interact with another. API itself cannot do anything unless it is connected to something. When the API is connected to services and microservices, it becomes useful, such as:
Function as a Service function service Machine Learning as a Service machine learning Software as a Service software service
API is the way you can distribute microservices to users. Instead of downloading the software, API distributes your service. API is necessary for the microservices architecture to function properly because API is the communication tool between its services. Without API, there would be a lot of disconnected microservices. Technically, microservices will be built as a whole again.
How does API work?
API is very generic. You can:
Create API on any containerized service to deploy API on any cloud provider in many different languages Java, Python, Go, etc.
API can improve the availability and openness of services. By simplifying distribution, you can provide smaller services. After all, you don't have to build all the services of the entire application to prove feasibility.
Many API are RESTful and exposed through endpoints such as HTTP. This means that accessing information from API is as easy as verifying URL. The GET, POST, PUT, DELETE commands, together with URL, can work as expected to get data or provide data to API. Although REST API is the most common in modern Web applications, other options include:
RPCGraphQL
As a product, API endpoints are usually provided with a development portal that tells developers how to use it and assigns API keys to developers. If the goal of the microservice is to provide data on registered vehicles, the development portal will explain:
The role of the service the structure of the data (that is, the data schema) requirements for developers to use API
Most good microservices have some type of API. If you want to use microservices, you will create an API.
So much for sharing about the difference between micro-services and API. I hope the above content can improve everyone. If you want to learn more knowledge, please pay more attention to the editor's updates. Thank you for following the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.