Vertx - Http Server (Web)

Java Conceptuel Diagram


Vertx web Provide APIs to deal with routing, handling of request payloads, etc.

Two HTTP Vertice

We can deploy the code for a HTTP server on the same TCP port twice and not expect any error for either of the instances, since the TCP port will already be in use.

With many web frameworks we would need to choose different TCP ports, and have a frontal HTTP proxy to perform load balancing between the ports.

There is no need to do that with Vert.x as multiple verticles can share the same TCP ports. Incoming connections are simply distributed in a round-robin fashion from accepting threads.

More …:


  • Create an HTTP server which simply returns “Hello World!” to each request.
Vertx.vertx().createHttpServer().requestHandler(req -> req.response().end("Hello World!")).listen(8080);

Documentation / Reference

Discover More
Java Conceptuel Diagram
Java - Vert.X Framework

Vert.x is not a framework but a toolkit: the core library defines the fundamental APIs for writing asynchronous networked applications, and then you can pick the useful modules for your application (e.g.,...

Share this page:
Follow us:
Task Runner