In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the knowledge of "how to choose a micro-service API gateway suitable for you". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
What is the purpose of the microservice API gateway?
Let's first take a look at the role of the microservice API gateway. The following figure is a brief illustration:
API gateway is not a new concept, which existed more than ten years ago. Its main function is to handle business-related requests uniformly as an entrance to traffic, so that requests can be processed more safely, quickly and accurately. It has the following traditional functions:
Reverse proxy and load balancing, which is consistent with the location and function of Nginx
Dynamic functions at runtime, such as dynamic upstream, dynamic SSL certificate and dynamic current limit and speed limit, which are not available in the open source version of Nginx.
Upstream active and passive health checks, as well as service breakers
Expand on the basis of the API gateway to become a lifecycle API management platform.
In recent years, business-related traffic is no longer just initiated by PC clients and browsers, but also from mobile phones and IoT devices. In the future, with the popularity of 5G, these traffic will increase more and more. At the same time, with the structural changes of micro-service architecture, the traffic between services will also begin to grow explosively. In this new business scenario, more and more advanced features of the API gateway have emerged:
The cloud is natively friendly, and the architecture needs to be lightweight and containerized.
Interfacing with Prometheus, Zipkin, Skywalking and other statistical and monitoring components
Support for gRPC proxy and protocol conversion between http and gRPC to convert a user's http request into an internal service gPRC request
Assume the role of OpenID Relying Party, connect with the services of identity authentication providers such as Auth0 and okta, and treat traffic security as a top priority
Serverless is realized by dynamically executing user functions at run time, which makes the edge nodes of the gateway more flexible.
Do not lock in users and support hybrid cloud deployment architecture
Finally, the gateway node should be state-independent and can be expanded and reduced at will.
With more than ten functions mentioned above, a micro-service API gateway can make users' services only care about the business itself, while the functions that have nothing to do with business implementation, such as service discovery, service breakout, identity authentication, current limit and speed limit, statistics, performance analysis, etc., can be solved at the independent gateway level. From this point of view, the API gateway can not only replace all the functions of Nginx to handle north-south traffic, but also complete the role of Istio control plane and Envoy data surface to handle east-west traffic.
What are the alternative API gateways?
It is precisely because the micro-service API gateway is so important that it has always been in a competitive position. Traditional IT giants have had a layout in this field for a long time, such as Google, CA, IBM, Red Hat, salesforce, and public cloud vendors such as AWS and Aliyun.
These closed-source commercial products are fully functional, covering the full lifecycle management of API, such as design, multilingual SDK, documentation, testing and release, and provide SaaS services. Some of them are integrated with the public cloud, which is very easy to use, but also brings two pain points:
Platform locked. API gateway is the entrance to business traffic. Unlike CDN-accelerated non-business traffic such as pictures and videos, it can be migrated at will. API gateways are bound with a lot of business-related logic. Once a closed-source solution is used, it is difficult to migrate smoothly and cheaply to other platforms.
Can not be secondary development. General large and medium-sized enterprises will have their own unique needs, need custom development, at this time you can only rely on manufacturers, and can not do their own secondary development.
So we prefer open source API gateway solutions, such as Kong, APISIX, Trk and so on. These API gateways are selected from the panorama of the Cloud Native Software Foundation (CNCF):
Compare the deployment and maintenance costs of type selection
Can it be fully deployed on a single machine, or do you need the cooperation of multiple nodes to use it?
Is there an external database dependency? Such as MySQL, Postgres?
Is there a web console that can operate the entire cluster?
Open source or closed source
Can you write your own plug-ins to extend the functionality of the API gateway?
When you use an API gateway, can you migrate to other API gateways smoothly and cheaply?
Will it be locked on a specific platform?
Can the deployment be privatized?
Does it support deployment in the user's own internal server?
Does it support the deployment model of multi-cloud and hybrid cloud?
Function
Whether the basic functions such as dynamic upstream, dynamic SSL certificate, active / passive health check are supported
Can you dock with Prometheus, Zipkin, Skywalking and other statistical and monitoring components
Whether the gateway configuration can be controlled through HTTP REST API and yaml configuration files
Community
Can users contact community developers through Github, QQ groups, Stack Overflow, etc.?
Are open source licenses friendly?
Is it easy to submit your own changes to the mainline version?
Is there a commercial company behind it?
Business support and prices
Is there a big difference between the open source version and the commercial version?
Is the commercial version charged according to the number of API calls or subscriptions?
API Gateway comparison
The following is the comparison of various API gateways from different angles:
API Gateway
Kong
APISIX
Trk
Apigee
AWS
Aliyun
Deployment mode
Stand-alone and cluster
Stand-alone and cluster
Stand-alone and cluster
Stand-alone is not supported
PaaS
PaaS
Data storage
Postgres
Or
Cassandra
Etcd
Redis
Postgres,Cassandra and Zookeeper
PaaS
PaaS
Whether it is open source
Apache 2.0 protocol
Apache 2.0 protocol
MPL
Agreement
No
No
No
Core technology
Nginx+Lua
Nginx+Lua
Golang
Unknown
Unknown
Unknown
Private deployment
Yes
Yes
Yes
No
No
No
Custom plug-in
Yes
Yes
Yes
No
No
No
Community activity
High
High
High
Medium
Low
Low
Docking external IdP
No
Yes
No
Yes
Yes
No
Support for yaml
Yes
Yes
No
No
No
No
We can see that Kong and APISIX are both very good choices.
This is the end of the content of "how to choose your own micro-service API gateway". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.