Live data from Hacker News

Gravitee: Open-Source API Gateway

gravitee.io

11–20 of 47 posts

Re: Gravitee: Open-Source API Gateway

#11
post #9
post #2

Trying it out now. For those who have already: how does Gravitee compare w/ Apigee, Kong, API Gateway etc.

API Gateway is closed source for one. Kong is written in Lua, for better or worse.

Hello, Marco here (CTO of Kong). Correct, Kong is primarily written in Lua with some bits in C, for two particular reasons: low latency and very high performance.

Lua per-se is a fast language (having a very small footprint), but running Lua on top of LuaJIT [1] is just so much faster. LuaJIT is an alternative implementation of the Lua VM created by Mike Pall and now supported by a few other folks and organizations like Cloudflare. Cloudflare in particular has a very large runtime implementation of the Lua + LuaJIT stack, and usually people are surprised to learn that at least 10% of the worldwide Internet traffic [2] goes through this stack.

With that said Lua + LuaJIT is being used in other applications as well, like mobile and embedded devices, where low footprint and high performance are required.

Having a low footprint is not just a nice-to-have, but a requirement for running a proxy in a Service Mesh deployment as a decentralized sidecar container (to not exhaust all the resources of the underlying VMs as we scale the number of pods and services) in addition to the traditional centralized API Gateway deployment.

[1] http://luajit.org/

[2] https://blog.cloudflare.com/cloudflare-traffic/

Re: Gravitee: Open-Source API Gateway

#13
post #11
post #9

Earlier quoted context omitted.

API Gateway is closed source for one. Kong is written in Lua, for better or worse.

Hello, Marco here (CTO of Kong). Correct, Kong is primarily written in Lua with some bits in C, for two particular reasons: low latency and very high performance. Lua per-se is a fast language (having a very small footprint), but running Lua on top of LuaJIT [1] is just so much faster. LuaJIT is an alternative implementation of the Lua VM created by Mike Pall and now supported by a few other folks and organizations l…

Recent CF blog (by a guest author) about increasing LuaJIT performance https://blog.cloudflare.com/more-consistent-luajit-performan...

Re: Gravitee: Open-Source API Gateway

#14

Why none of these API gateways offer monetization out of the box? I'm curious. Is that a not well-demanded feature? I have researched a lot of them and none have a straight way to do metered billing and if they somehow do, they are prohibitively expensive. Does somebody know of an API gateway solution that offers this?

Apigee has some monetization features... https://docs.apigee.com/api-platform/monetization/basics-mon...

They do, but it's $500 USD per month for the most basic plan. I'm looking for something that can start small and scale as needed.

Re: Gravitee: Open-Source API Gateway

#16

Why none of these API gateways offer monetization out of the box? I'm curious. Is that a not well-demanded feature? I have researched a lot of them and none have a straight way to do metered billing and if they somehow do, they are prohibitively expensive. Does somebody know of an API gateway solution that offers this?

Billing is a hard issue since there is no common API to do that. All payment gateways are different. And what is most important, it lot of cases it requires some application logic, on how exactly you want to bill the user: for example partly static, partly dynamic. What API gateway can do, is to provide you with a way to set a quota for a given user, track analytics, and have it all accessed in a programmatic way, so…

I think key issue here is that legacy api management solutions lock you into their billing flows and providers. An open SRC gateway like Tyk will give you freedom to use your own billing solution and define your own verticals at expense of slightly more complexity at integration/implementation.

Re: Gravitee: Open-Source API Gateway

#17
post #11
post #9

Earlier quoted context omitted.

API Gateway is closed source for one. Kong is written in Lua, for better or worse.

Hello, Marco here (CTO of Kong). Correct, Kong is primarily written in Lua with some bits in C, for two particular reasons: low latency and very high performance. Lua per-se is a fast language (having a very small footprint), but running Lua on top of LuaJIT [1] is just so much faster. LuaJIT is an alternative implementation of the Lua VM created by Mike Pall and now supported by a few other folks and organizations l…

Wow that’s a fascinating codebase you’ve got. I mainly used Lua for scripting C/C++ codebases, never saw a large app that does the reverse. Seems to be very clear code in the functional style without too much object-orientation, did you specifically choose to not use that too much?

Re: Gravitee: Open-Source API Gateway

#18
post #11

Earlier quoted context omitted.

Hello, Marco here (CTO of Kong). Correct, Kong is primarily written in Lua with some bits in C, for two particular reasons: low latency and very high performance. Lua per-se is a fast language (having a very small footprint), but running Lua on top of LuaJIT [1] is just so much faster. LuaJIT is an alternative implementation of the Lua VM created by Mike Pall and now supported by a few other folks and organizations l…

Recent CF blog (by a guest author) about increasing LuaJIT performance https://blog.cloudflare.com/more-consistent-luajit-performan...

tl;dr: Lua is a GC language and that's where the variance comes from.

Re: Gravitee: Open-Source API Gateway

#19
post #11

Earlier quoted context omitted.

Hello, Marco here (CTO of Kong). Correct, Kong is primarily written in Lua with some bits in C, for two particular reasons: low latency and very high performance. Lua per-se is a fast language (having a very small footprint), but running Lua on top of LuaJIT [1] is just so much faster. LuaJIT is an alternative implementation of the Lua VM created by Mike Pall and now supported by a few other folks and organizations l…

Wow that’s a fascinating codebase you’ve got. I mainly used Lua for scripting C/C++ codebases, never saw a large app that does the reverse. Seems to be very clear code in the functional style without too much object-orientation, did you specifically choose to not use that too much?

Lua doesn’t fit too well with the object oriented model (although possible) without being “hacky”, so we decided to leverage the strengths of the language rather than forcing ourselves to use a model that’s not well suited for the language.

Re: Gravitee: Open-Source API Gateway

#20

Why none of these API gateways offer monetization out of the box? I'm curious. Is that a not well-demanded feature? I have researched a lot of them and none have a straight way to do metered billing and if they somehow do, they are prohibitively expensive. Does somebody know of an API gateway solution that offers this?

a stripe 'plugin' would be great.
Post reply on HN