Currently we instantiate the HTTP server for a Main class, and we don't use at all the concept of Verticle of Vert.x .
That was ok to start with, but this does not allow to scale, as there is only one event-loop, with one thread; in short: we are mono-threaded, and for some IG Handler, like the ResourceHandler that really scales down the performance. We are reading the files to serve in a synchronous way, through a good old InputStream, which is blocking. So we have only 1 thread that blocks to read a file: we can't imagine better scenarii to decrease the performances. Moving to an asynchronous read of the file require a lot of change, firstly in CHF.
In the meantime, if we use a Verticle we could tell Vert.x to instantiate few instances. Thanks to its port unifications, all the Verticle instances would listen on the same ports, but we would have multiple event-loops, and thus limit the loss of performance.
- Number of verticles configurable in admin.json
- Appropriate number of verticles are created
- The HttpApplication instance is shared amongst all verticles