Skip to content

francoisperron/java-httpservers-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How easy is it to change the http server implementation in a java project?

With @ericminio, we wanted to explore the port and adapter pattern on a http server. Exploring this idea, we found it pretty simple to hide behind interfaces which http server library was used at run-time.

The Server, Endpoint, HttpRequest, and HttpResponse emerge as interfaces we like to use when dealing with http communication. They are all in the same http package inside the core of the application.

We tested these implementations: built-in java http server, simple, servlet and jetty duo, and undertow.

These implementations are outside the core of the application, in the http adapter package. As you can see, we choose not to use the routing of any of these libraries.

How do they perform?

They all do a pretty good job for the vast majority of http servers out there. However, some are better under heavy load. We found it pretty distrubing that the built-in java http server could not handle a hundred simultaneous TCP connection, and drops packets.

We found TechEmpower frameworks benchmarks a better place to check for http server performance.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages