Kong vs Nginx performance

1,892 views
Skip to first unread message

vidurmal...@gmail.com

unread,
Sep 14, 2017, 2:56:33 AM9/14/17
to Kong
Hi,
I was doing a load testing of Kong as well as Nginx server. Kong is giving me 50% better performance than Nginx. I am using both as an API gateway with basic authorization plugin configured in both.

I am not able to understand how Kong is giving better performance than Nginx. Kong is basically built on top of nginx (a very solid core), so pretty much the latency should be nginx + Lua execution.

vidurmal...@gmail.com

unread,
Sep 14, 2017, 3:14:05 AM9/14/17
to Kong
Also, if I directly hit my server without using Kong as a proxy, the response time is greater than if use Kong as a proxy in front of my API server. I am not able to understand.

Ruwen Schwedewsky

unread,
Sep 14, 2017, 3:22:13 AM9/14/17
to kong...@googlegroups.com
Hi!

Where do you get your credentials from in the other cases?

Kong is caching the basic auth credentials. And maybe the Nginx
configuration provided by Kong is better tweaked that yours?

Cheers
Ruwen

vidurmal...@gmail.com

unread,
Sep 14, 2017, 3:29:32 AM9/14/17
to Kong
If if I directly hit the server, I am bypassing the authorization. How can Kong achieve better performance in this case?

Also, can you provide some insight on how Kong achieve better performance than Nginx. It will help me make a wise decision on which one to choose.

Ruwen Schwedewsky

unread,
Sep 14, 2017, 3:42:52 AM9/14/17
to kong...@googlegroups.com
On Thu, 2017-09-14 at 00:29 -0700, vidurmal...@gmail.com wrote:
> If if I directly hit the server, I am bypassing the authorization.
> How can 
> Kong achieve better performance in this case?

I wasn't sure if you had implemented BasicAuth in your server yourself.

> Also, can you provide some insight on how Kong achieve better
> performance 
> than Nginx. It will help me make a wise decision on which one to
> choose.

I am not an nginx expert, but since Kong is based on nginx, I guess it
has something to do with the configuration. Maybe have a look at the
nginx config Kong is using and try to apply it to your nginx. And maybe
check if you are comparing the same versions.

Cheers
Ruwen

> On Thursday, September 14, 2017 at 12:52:13 PM UTC+5:30, Ruwen
> Schwedewsky 
> wrote:
> >
> > Hi! 
> >
> > Where do you get your credentials from in the other cases? 
> >
> > Kong is caching the basic auth credentials. And maybe the Nginx 
> > configuration provided by Kong is better tweaked that yours? 
> >
> > Cheers 
> > Ruwen 
> >
> > On Thu, 2017-09-14 at 00:14 -0700, vidurmal...@gmail.com
> > <javascript:> 

Cooper Marcus

unread,
Sep 14, 2017, 10:59:52 AM9/14/17
to kong...@googlegroups.com
Sounds like we need more details on your load testing setup and Kong and Nginx configurations to help you trouble-shoot. While Kong is incredibly fast, it is difficult to imagine that Kong+NGINX could be dramatically faster than NGINX without Kong. 

--
You received this message because you are subscribed to the Google Groups "Kong" group.
To unsubscribe from this group and stop receiving emails from it, send an email to konglayer+unsubscribe@googlegroups.com.
To post to this group, send email to kong...@googlegroups.com.
Visit this group at https://groups.google.com/group/konglayer.
To view this discussion on the web visit https://groups.google.com/d/msgid/konglayer/1505374967.3804.5.camel%40messagemedia.com.au.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages