Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to get started with domestic Micro Service Gateway Apache APISIX

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article is about how to get started with the domestic micro service gateway Apache APISIX. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it.

APISIX is a high-performance and scalable micro-service API gateway. It is implemented based on Nginx and etcd. Compared with traditional API gateways, APISIX acts as a micro-service request gateway, providing load balancing, logging, authentication and other functions through plug-ins:

Dynamic load balancing: dynamic load balancing of different upstream services

Security plug-in: built-in security processing layer, such as OAuth3, ACL, CORS, dynamic SSL and IP restrictions

Flow control plug-ins: rate limit, request limit and response rate limit, etc.

Analysis and monitoring plug-ins: visualization, inspection and monitoring of API traffic with products such as Prometheus,Datadog and Runscope

Blog plugin: record requests or responses to blogs and send them to your system (e.g. StatsD, Syslog) via HTTP, TCP or UDP.

Github: https://github.com/iresty, you can see that compared to Kong, Traefik is very concise from the source point of view.

Install openresty

Based on OpenResty, remember OpenResty is a high-performance Web platform based on Nginx and Lua.

Yum install yum-utilsyum-config-manager-- add-repo https://openresty.org/package/centos/openresty.repoyum install-y openresty install etcd

Etcd a (key-value) strongly consistent NoSQL database. Compared with the PostgreSQL relational database used by Kong, it is another bright spot.

Yum install-y etcd service etcd start yum install-y https://github.com/iresty/apisix/releases/download/v0.8/apisix-0.8-0.el7.noarch.rpm starts apisixsudo apisix start

Access the console: http://127.0.0.1:9080/apisix/dashboard/. You can access it directly.

PS: the login function has not been realized, it's a lie!

Functional experience

The goal is to implement the reverse proxy of the web service and to limit the current.

Upstream > add

2. Routes > add

Token bucket current limit configuration

Rate # flow rate per second

Volume of burst # token bucket

Key # based on which header to limit the current

Rejected_code # returns an error code

Visit: ip:9080/ to experience the effect of current restriction

The above is how to get started with the domestic micro-service gateway Apache APISIX, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report