JBoss AS 5 Performance Tuning
上QQ阅读APP看书,第一时间看更新

Scalability: the other side of performance

As we have just learnt, we cannot define performance within the context of a single user who is testing the application. The performance of an application is tightly coupled with the number of users, so we need to define another variable which is known as Scalability. Scalability refers to the capability of a system to increase total Throughput under an increased load when resources are added. It can be seen from two different perspectives:

  • Vertical scalability: (otherwise known as scaling up) means to add more hardware resources to the same machine, generally by adding more processors and memory.
  • Horizontal scalability: (otherwise known as scaling out) means to add more machines into the mix, generally cheap commodity hardware.

The following image is a synthetic representation of the two different perspectives:

Scalability: the other side of performance

Both solutions have pros and cons: generally vertical scaling requires a greater hardware expenditure because it needs upgrading to powerful enterprise servers, but it's easier to implement as it requires fewer changes in your configuration.

Horizontal scaling on the other hand, requires little investment on cheaper hardware (which has a linear expenditure) but it introduces a more complex programming model, thus it needs an expert hand as it concerns configuration and might require some changes in your application too.

Note

You should also consider that concentrating all your resources on a single machine introduces a single point of failure, which is the case if you choose an extreme type of vertical scaling.