Japronto vs Go net/http

465 views
Skip to first unread message

Gopher

unread,
Mar 8, 2017, 2:35:09 AM3/8/17
to golang-nuts
Hi.Does anyone know why the Japronto is faster? Is it possible to do something about it? I noticed that the response header is larger than japronto header. Response header net/http additionally includes the current date.

https://github.com/squeaky-pl/japronto


Wojciech S. Czarnecki

unread,
Mar 8, 2017, 4:44:21 AM3/8/17
to golan...@googlegroups.com
Dnia 2017-03-07, o godz. 23:34:54
Gopher <szep...@gmail.com> napisał(a):

> Hi.Does anyone know why the Japronto is faster?
["" from japronto github pitch.]

Because "The server is written in hand tweaked C trying to take advantage of
modern CPUs." What translates to 'it will run fast if it will'.

> Is it possible to do something about it?

Yes. Once it (japronto) will come out of "early preview with alpha quality
implementation" state and it start to implement standards you will be
pleased to see it to be gradually less and less 'faster than'.

> I noticed that the response header is larger than japronto header.
> Response header net/http additionally includes the current date.

As said: standards.

--
Wojciech S. Czarnecki
^oo^ OHIR-RIPE

Tamás Gulácsi

unread,
Mar 8, 2017, 4:46:10 AM3/8/17
to golang-nuts
Japrono is mostly written in C.
It provides only HTTP/1.1, with not-too-widespread pipelining support.
No HTTP/2, so not future proof.

As the readme says, fasthttp is only 18% slower than japronto. And we know that fasthttp is fast because of different design goals: it sacrifices ease of use and proper RFC compatibility for speed.

szep...@gmail.com

unread,
Mar 8, 2017, 1:35:51 PM3/8/17
to golang-nuts
Thanks for the answers.
Reply all
Reply to author
Forward
0 new messages