News for hackers. Stuff that matters.
Re:Gravitee: Open-Source API Gateway by joombaga on Saturday December 29, 2018 @03:00PM (#18785388)
Trying it out now. For those who have already: how does Gravitee compare w/ Apigee, Kong, API Gateway etc.
Re:Gravitee: Open-Source API Gateway by rdli on Saturday December 29, 2018 @06:50PM (#18786413)
From what I gather in the GitHub repository, they implement their own L7 management, instead of using NGINX, Envoy, HAProxy, etc. IMO, this adds quite a bit of development cost with minimum benefit.

Kong has built on OpenResty (which is built on NGINX), Ambassador has been built on Envoy Proxy -- I think these projects will be able to sustain their velocity more so than projects that need to maintain their own L7 engine. Just watching the speed at which Envoy Proxy is adding stuff is kind of staggering; hard to imagine how another company could do the same on their own homegrown engine.

Re:Gravitee: Open-Source API Gateway by jively on Saturday December 29, 2018 @09:57PM (#18787076)
Tyk runs its own L7 engine, mainly around primitives provided by the Golang stdlib, IMO having full control over this part provides a lot more flexibility than sitting on top of someone else’s stack, bugs are faster to eke out and optimisation doesn’t rely on upstream code.

(Caveat: I’m the CEO of Tyk)

Re:Gravitee: Open-Source API Gateway by alain_gilbert on Saturday December 29, 2018 @10:09PM (#18787110)
Sorry for asking simple questions.

Can someone tell us what exactly is L7 ?

It seems like I cannot find any information when googling it.

Re:Gravitee: Open-Source API Gateway by alain_gilbert on Saturday December 29, 2018 @10:15PM (#18787145)
For those interested, "L7 engine" seems to be the "application layer" https://en.wikipedia.org/wiki/Application_layer in the OSI model https://en.wikipedia.org/wiki/OSI_model

So communication protocol such as gRPC and HTTP.

Re:Gravitee: Open-Source API Gateway by niutech on Saturday December 29, 2018 @09:27PM (#18786987)
Here is an answer from Gravitee dev: https://dev.to/brasseld/comment/25kb

NB. There are more open source alternatives: API Umbrella and Tyk.

Re:Gravitee: Open-Source API Gateway by jxub on Saturday December 29, 2018 @03:51PM (#18785606)
API Gateway is closed source for one. Kong is written in Lua, for better or worse.
Re:Gravitee: Open-Source API Gateway by fosk on Saturday December 29, 2018 @04:17PM (#18785739)
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 by judge2020 on Saturday December 29, 2018 @04:28PM (#18785808)
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 by loeg on Saturday December 29, 2018 @05:10PM (#18786019)
tl;dr: Lua is a GC language and that's where the variance comes from.
Re:Gravitee: Open-Source API Gateway by fsfod on Saturday December 29, 2018 @07:56PM (#18786668)
As the co-author of that blog post a more accurate tl;dr would be the variance comes from shared hot counters that collide based on the address of objects.
Re:Gravitee: Open-Source API Gateway by loeg on Sunday December 30, 2018 @02:40PM (#18790901)
Ok, to resummarize: LuaJIT is a JIT'd interpreter for a GC'd language and those two factors are where the variance comes from.

You found some very low hanging fruit in the JIT engine in particular (64 global trace buckets), fixed it and at least threw it over the fence upstream (and kudos for that). But you buried it in a bunch of irrelevant figures, and at the end of the article you rediscovered GC pauses. GC pauses are a classic, well-known problem with GC languages.

My critiques are this:

1. There is a huge body of prior work and analysis of JIT'd and GC languages due to the outsized impact of Java, probably the most popular language on the planet at one point (if it isn't still). (And Golang — Java 2.0.) Java's history (and perhaps Golang's more recent history) should have been top-of-mind at the outset of this project. I think you could continue to apply lessons learned from abundance of experience around Hotspot and JRE tuning to the LuaJIT interpreter.

2. The lengthy benchmark spreadsheets seem like a distraction rather than a useful tool. They're certainly not adding much to the article and could be summarized in 2-3 sentences each. If you really felt like it, they could be linked to an external appendix.

Re:Gravitee: Open-Source API Gateway by ThePhysicist on Saturday December 29, 2018 @05:04PM (#18785995)
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 by fosk on Saturday December 29, 2018 @05:26PM (#18786076)
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 by jgrahamc on Sunday December 30, 2018 @05:05AM (#18788398)
Yes, that's right we do have a large Lua (using LuaJIT) code base but we are moving away from it.
Re:Gravitee: Open-Source API Gateway by tarcio on Saturday December 29, 2018 @03:30PM (#18785515)
Keen to know that too. We are heavily relying on Kong at my work.