Rescaling Your Application in GigaSpaces

In GigaSpaces, an application can be configured to run in any number of partitions, with a defined amount of RAM and CPU resources for each partition. This initial scaling is done when the application/processing unitClosed This is the unit of packaging and deployment in the GigaSpaces Data Grid, and is essentially the main GigaSpaces service. The Processing Unit (PU) itself is typically deployed onto the Service Grid. When a Processing Unit is deployed, a Processing Unit instance is the actual runtime entity. is deployed.

It is critically important to be able to rescale an application while it is online, without downtime or performance degradation. GS provides this capability.

GS allows two kinds of dynamic, online rescaling: vertical scaling, and horizontal scaling.

Vertical Scaling

Vertical scaling, referred to as On Demand Scale Up/Down, allows the amount of RAM and CPU to be increased or decreased - without downtime - for an active GigaSpaces cluster.

For example, additional memory or CPUs may be added to an existing physical node.

On Demand Scale Up/Down can be used for applications that have many "atomic" transactions (logical units of work), often using relational databases.

Advantages

  • Resources are located close physical proximity.
    This allows faster access to related data, such as credit/debit table updates in a closed (atomic) unit of work..
  • Performance gain, because you have more RAM and CPU on each update.
    For example, if an application expects a significant increase in resource requirements at 9 am daily, the system may be scaled up to perhaps 20 times greater CPU capacity from 9 am to 9:15 am each day. In this way, SLA/performance levels can be met consistently throughout the day.

Use Case

Vertical scaling can be used for a traditional DBMS (Database Management System) where atomic transactions are performed in the same physical node.

Horizontal Scaling

Horizontal scaling, referred to as On Demand Scale Out/In, means to add or reduce the number of partitions used for an application.

For example, additional partitions may be created in the same server, or alternatively, servers may be added or removed.

Big data is often stored in geographically dispersed nodes, which includes partitioning of databases.

If the application involves few cross-partition joins, it may be appropriate for On Demand Scale Out/In.

NoSQL databases often use On Demand Scale Out/In.

Advantages

  • Horizontal scaling can be less expensive than vertical scaling - it is generally less expensive to add cloud storage, than to purchase new physical machines.
  • This method of rescaling provides resilience and fault tolerance - with more partitions, the impact of a partition failure is lessened.
  • Horizontal scaling supports linear increases in capacity on the fly - RAM or CPU capacity can be increased or decreased while maintaining a constant RAM:CPU ratio .