Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Unix socket performance numbers

If you feel the need for speed,  use unix sockets,  they really are faster than TCP/IP.  In some cases with microservices you can put a number of them on one machine and use every means necessary to get latency down and sockets are good for that.  Switching socket type is easy,  so you can move the service off the machine when you want to.



On Fri, Nov 20, 2015 at 12:59 PM, Emmeran Seehuber <rototor@xxxxxxxxxx> wrote:
Hi,

> Am 20.11.2015 um 13:01 schrieb Silvio Bierman <sbierman@xxxxxxxxxxxxxxxxxx>:
> ...
>
> Perhaps I need to do a test setup. I would have leaned toward nginx before, is there a reason why I should prefer HAProxy?
>

I would say it depends on what you need. If you just need SSL/HTTPv2 termination then HAProxy is for sure all you need. If you want to cache some dynamically generated content (e.g. resized images, or webp recoded images, …) then you may want to use nginx, because it can cache all that content for you and you can adjust this cache configuration without restart verify quickly. If you want to be able to upgrade your jetty based server without downtime you can use HAProxy for this. While upgrading you first start a „backup“ jetty on an other port, then you tell HAProxy (via a shell command) that this backup server is up, disable the „primary“ server, restart that server, and then tell HAProxy that the primary server is back and then disable and shutdown the backup server. You won`t „loose" any request that way.

As we need both features we use nginx and HAProxy. Nginx sits in front of HAProxy which sits before the jetty server. Saving some nano seconds between HAProxy and Jetty using Unix Sockets would be nice, but to be honest, the setup is already fast enough for our current needs :)

cu,
  Emmy
>
> On 11/20/2015 12:32 PM, Simone Bordet wrote:
>> Hi,
>>
>> On Fri, Nov 20, 2015 at 12:11 PM, Silvio Bierman
>> <sbierman@xxxxxxxxxxxxxxxxxx> wrote:
>>> Hello Greg,
>>>
>>> Can you shed any light on why HAProxy is so much faster than Jetty in
>>> handling SSL?
>> Historically, the JDK implementation of TLS (which we use in Jetty)
>> has been known for not being particularly fast and for being memory
>> hungry.
>> I'm not surprised that a C implementation based on OpenSSL outperforms
>> JDK's, even though the JDK is adding intrinsics to exploit native CPU
>> instructions, so perhaps, eventually, it may compare.
>>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>

Mit freundlichen Grüßen aus Augsburg

Emmeran Seehuber
Dipl. Inf. (FH)
Schrannenstraße 8
86150 Augsburg
USt-IdNr.: DE266070804

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Paul Houle

Applying Schemas for Natural Language Processing, Distributed Systems, Classification and Text Mining and Data Lakes

(607) 539 6254    paul.houle on Skype   ontology2@xxxxxxxxx

:BaseKB -- Query Freebase Data With SPARQL

Legal Entity Identifier Lookup

Join our Data Lakes group on LinkedIn


Back to the top