Apache Apisix: Open-Source API Gateway and API Management Platform
apisix.apache.org
apisix.apache.org
Really enjoyed reading CloudFlare's justification for wrtiting Pingora gateway recently[1], a similar-ish system. Im interested to see what systems tech (what system calls) it ends up using.
There's a ton of really great ingress/gateway tech out there. Kubernetes has a sublist that's pretty long[2]. There's a good comparison matrix[3] I ran into & it immediately made me very interested in APISIX (lots of box ticking). I think at one point I'd also run into a benchmark somewhere & they were quite performant, top tier. Would be interested to know more about tbeir chosen architecture & what if any performance optimizations they have planned/roadmapped/are-thinking-about.
[1] https://blog.cloudflare.com/how-we-built-pingora-the-proxy-t... https://news.ycombinator.com/item?id=32836661 (362points, 1d ago, 92comments)
[2] https://kubernetes.io/docs/concepts/services-networking/ingr...
Here's an example (top Google result) https://amalaruja.medium.com/basic-http-routing-strategies-w...
Years ago we were going to write an extension to Envoy to decode our side channel session info so we could do without per-language client intelligence and additional service calls.
We didn't want to blow up production traffic - millions of dollars of transactions - because of stupid memory management and pointer blunders.
This comment sounds too cargo-cultish to be taken seriously.
> We didn't want to blow up production traffic - millions of dollars of transactions - because of stupid memory management and pointer blunders.
You might be surprised to learn that C++ is the tool of the trade of the high frequency trading sector. The key factor is that people who actually work on millions of dollars of transactions do make technicalll decisions instead of blindly going the fanboy path.
Your attitude is incredibly rude and dismissive. Far worse than whatever you're accusing me of.
We do incredible volume and felt this was a risk to our customers.
My attitude is to point out the mistakes of succumbing to fanboyism and blindly going with cargo cult beliefs that make no sense and have no bearing in reality. Complaining that pointing out the fact that the high frequency trading sector is built upon C++ is dismissive says more about your personal beliefs than anything else.
> We do incredible volume and felt this was a risk to our customers.
I really doubt you do more transactions per second than any high frequency trading company running a C++ stack. The likes of Optiver are doing just fine with C++.
Just be honest and humble and state that your expertise lies elsewhere, and your choice had zero to do with technical reasons.
I'm done with this conversation.
P.S Apache APISIX supports using WASM, which means we could use Java, Golang, Python to implement plugins and run it in APISIX’s core.
1. Apache APISIX is a project of the Apache Software Foundation, while Kong is a project controlled by a commercial company (it is possible to change the license).
2. The Apache APISIX community is more active and vibrant
After asking users why they prefer Apache APISIX than other solutions, there have four important points:
1. Feature Rich: Many users need to use API Gateway with OpenID Providers (e.g., Auth0, Keycloak), other solutions sold this feature on Enterprise Product only. There has one How-to guide "Use Keycloak with API Gateway to protect your APIs".
2. Quick Support: Apache APISIX has many active contributors and maintainers, they keep watching activities on GitHub[3], Slack[1], Mailing List and other channels. When users ask questions, they respond quickly, the goal is to help users onboard quick.
3. Apache Project: After APISIX project was donated to the Apache Software Foundation, it means nobody can change its License any more, so enjoy Apache projects ([https://www.apache.org](https://www.apache.org)).
4. Benchmark is excellent, and the most active maintainer's explaination here[4]: LuaJIT + Nginx.
P.S Welcome to join Apache APISIX Slack[1] to discuss, and you can find many useful posts from its blog[5].
- 1. https://apisix.apache.org/slack - 2. https://apisix.apache.org/blog/2022/07/06/use-keycloak-with-... - 3. https://github.com/apache/apisix - 4. https://apisix.apache.org/blog/2021/08/25/why-apache-apisix-... - 5. https://apisix.apache.org/blog
Developers can version their API now within helm charts or even yaml templates held along the code in their repositories.
1. It can dynamically manage lots of TLS certificates and do the TLS/SSL terminate or use mTLS to communicate with the upstream; 2. Plugins like ACL, IP Restriction, CSRF, and Referrer Restriction restrict API access in different dimensions.
Or is mTLS only possible with client->pass through APISIX->upstream? It's not quite clear from the docs.
mTLS is both possible for client -> APISIX and APISIX -> upstream.
[1] https://gist.github.com/bzp2010/6ce0bf7c15c191029ed547245471...
Looks like mostly Lua because it based on OpenResty
Somehow micro services and cloud native turned into that. So yeah, slow response times, wasted infrastructure and most work put into I/O and serialization/deserialization.
I think we forgot what actual monoliths look like and just kept decomposing… I guess that is an appropriate term.
This personal assertion only holds if you somehow chose to adopt a component that you need, or blindly adopt components even though you have no idea what you're doing. Discussing these scenarios is pointless and a waste of time though.
Meanwhile, reverse proxies and ingress controllers are fundamental components in any service that outgrows a box under the desk, and a API Gateway is nothing more than a specialized reverse proxy whigh offers some high level features as part of it's happy path.
Maybe if you're running one instance of your API server.
But if you're not then API Gateways end up being significantly simpler.
I'm not sure how it differs, can you explain more? From my perspective each API instance is just one more `server x.x.x.x:port` in my `upstream someapi { ... }` section in Nginx config. Be it 1 or 20.
No difference from regular Loadbalancing as I see it.
For multiple APIs (api1, api2...) you end up with different `location {}` and using specific `upstream {..}` blocks upon request from deb/backend team.
An API gateway is an adapter. You can build a web API out of multiple independent web services, like microservices or simply versioned APIs. On top of that you can do anything a proxy does, like load balancing, TLS termination, rate limiting, monitoring, etc. Basically a API gateway is a higher-level abstraction over a proxy which saves some time and effort implementing some basic features.
> Auth should already be handled by the api (...)
That won't make a dent if you are running a single instance of a single service.
Once you start to run multiple instances of multiple services then things start to break down.
If you: - have more than 1 upstream service to hide behind your api.bigcorp.com name? - want to enforce standard authn/authz patterns across lots of teams/backend services? - want a standard approach to all the Quality of Service management? - want to have a well defined lifecycle for your APIs? - want to have a portal that describes the APIs, how they work and facilitate users getting access to them?
API Gateways are a thing because web servers that started out being used as reverse proxies were not that easy to configure and just did way too much web server stuff. API gateways made this easier, and added a host of security measures to make it somewhat safer when presenting APIs to the internet.
Then API management came along as a first class concern for orgs who want others to use their APIs.
It's good to see some FOSS innovation in this domain, most of the real open source API gateways are a huge mess. Kong is great, but the really useful stuff is part of the paid enterprise platform.
Is KrakenD some kind of generic term, or does that project just have a complex history?
The open source API Gateway project, APISIX, was open sourced and donated to Apache Software Foundation by API7.ai[1] in 2019, many people asked why not use Kong, AWS or other products? The main reason was Kong relies on PostgreSQL and AWS Gateway is vendor locked, now Kong has supported the DB less deployment mode, Apache APISIX also supports this way, this mode is easy to maintain with GitOps.
Here has some useful links IMO:
1. https://apisix.apache.org/blog/2021/08/25/why-apache-apisix-... 2. https://apisix.apache.org/blog/2021/06/28/why-we-need-apache... 3. https://api7.ai/blog/why-is-apache-apisix-the-best-api-gatew...
P.S Apache APISIX has one Slack channel under the Apache Software Foundation, it reaches to 1000+ members today! (All from organic)
[1] https://api7.ai/