| High performance
and high scalability are fundamental requirements for a streaming/push server, that has to support many concurrent connections and deliver data to the client in the shortest possible time.
Lightstreamer Server is a real-time system implemented in
Java. In order to guarantee the maximum level of performance,
the Server has been developed as a stand-alone process which
does not rely on an underlying web server or application server.
In this way it is possible to have direct control over the
TCP/IP layer of the system and over the threading model of the
application. True push solutions need to maintain at least one
open TCP socket for each connected client. Some web/application
servers have been extended to act as streaming engines, but
their traditional architecture based on the
“one-thread-per-connection” model makes scalability pretty
impossible to tens of thousands of users. Lightstreamer adopts a
staged event-driven architecture instead of a
thread-based one, making it possible to decouple the number of
connections that the Server can sustain from the number of
threads that are employed. The Java NIO classes are fully
exploited to implement this model, through asynchronous I/O,
for both HTTP and HTTPS connections.
Lightstreamer Server process can scale well over multiple
CPUs. In case of CPU saturation, Lightstreamer offers a
“graceful degradation”, i.e. the system does not hang abruptly
but progressively decreases its performance while guaranteeing
service continuity. The system can scale horizontally too by
adding more boxes beyond a common web load balancing
appliance in order to form a cluster.
Capacity planning depends on many variables. The most
important are the inbound and outbound event throughputs,
message sizes, maximum latencies. For these reasons the best way
to decide the required hardware is to run specific simulations
for the necessary scenarios. A specific Load Test Toolkit
can be provided to run the simulations. Just to give a general
idea about Lightstreamer’s scalability, when data push happens
at low frequency (around 1 update per second for each user),
10,000 concurrent users can be handled by a single CPU. |