Hi,
I hope the following can help a bit more on the big picture:
config.xml
|
Jetty-0
|
C1 C2 C3 C4
Jetty-1 Jetty-2 Jetty-3 Jetty-4
* In above, C-X is a concrete object extract from config.xml that can perform certain operations.
* For each C-X, we configure and start an independent Jetty instance.
* Jetty-0 is able to manage the life cycle of the other Jetty instances such as stop, reload config, and so forth.
* Jetty-0 is able to add a new Jetty instance in case a new C5 appears in config.xml
* Every Jetty-(1-4) can have no affect on the operation of others in case we need to separately make changes to one of them.
* All Jetty-(1-4) provide the same REST API (though on different ports).
* Although all in one JVM, each Jetty instance uses a separate thread pool to serve its requests and as such is able to provide an independent layer of load management.
On the other side, one thing that directly comes to mind is that when for instance 50 instances of Jetty's are started on in one JVM, how would this affect the runtime performance of the single JVM? Any other concerns you can kindly refer based on this idea?
Thanks for mentioning Apache ZooKeeper, however, regarding its definition, it mainly targets "configuration coordination" which is not exactly our case.
The main purpose for me is to validate such an idea and if sensible look for best practices or advice from Jetty developer community.
Thanks,
Behrooz