Skip to main content

Posts

Showing posts from May, 2020

HTTP/2 Java Server using Embedded Jetty - Part 1

Have you ever wanted to configure internal Java servers using HTTP/2 (or H2 in short), because of the following advantages? Internal clients making concurrent calls, can now use a single connection by utilizing the multiplexing nature of HTTP/2. Server will/can use less threads as there are less connections overall. Servers can also push resources/data and can communicate using websockets But what if you don’t want to go through tedious process of setting up SSL/TLS certificates? HTTP/2 insists on SSL/TLS as no browser supports HTTP/2 on insecure mode. Or what if you want to save every bit of CPU and time by skipping encryption and decryption? You are at the right place. Since everyone nowadays is moving towards (or talking about) micro services, we will also configure Jetty HTTP/2 server in embedded mode. What more? We are also going to configure our server to use Asynchronous Servlets and Asynchronous IO (aka non-blocking IO or NIO) in Part-2 of this article.