Simple High Availability (HA) solution for sMash

If a sMash application needs to be highly available it can be clustered across 2 machines in a horizontal cluster. If one application becomes inoperative because of a software or a hardware problem the other instance of the application can continue to service requests maintaining availability of the overall application.

An HA horizontal cluster requires a proxy fronting the 2 instances of the application running on different machines. It also optionally requires a state replication mechanism if the application holds state.

Stateless Application

sMash encourages a stateless programming paradigm. If a stateless application has to be horizontally clustered for high availability, it is done as follows. on hostA/App zero modproxy generate -o=hostA.conf on hostB/App zero modproxy generate -o=hostB.conf Copy hostA.conf and hostB.conf to hostA/App directory and merge the configuration as follows zero modproxy merge -balancer -o=App.conf hostA.conf hostB.conf

Add the following line to the appropriate apache configuration file (typically httpd.conf or default-server.conf)

Include path_to_App.conf Details regarding configuring the proxy can be found here.

Stateful Application

State Managed by Application

sMash generates session cookies compatible with Apache mod_proxy. A stateful application cluster is configured so that sMash generates session cookies containing sticky routing information which Apache mod_proxy uses when configured appropriately . sMash doc here gives details about setting it up.

ZeroHAByApp.gif
Application manages state, sMash provides session affinity

As of 1.0.1 or Silverstone M1 sMash does not provide state replication or synchronization mechanism. The application must manage its own state by storing it in a database or another persistent store.

State Managed by sMash

In the upcoming release, sMash will introduce sMash Sync which is a synchronization and replication mechanism for zones. When USER zone is configured to use this mechanism, sMash supports session recovery in case the instance holding a session goes down. Session data is replicated at the other instance which can continue to service new requests on the session.

sMash SYNC can be used with other zones such as STORAGE zone.

ZeroHASync.gif
sMash provides state sharing through sMash sync

-- Mandar - 04 Aug 2008

  Attachment Action Size Date Who Comment
gif ZeroHAByApp.gif props, move 30.8 K 05 Aug 2008 - 13:04 Mandar HA without sMash sync
gif ZeroHASync.gif props, move 29.9 K 05 Aug 2008 - 13:05 Mandar HA with sMash sync
r4 - 07 Aug 2008 - 21:27:29 - Mandar
Syndicate this site RSS ATOM
Copyright 2007 © IBM Corporation | Privacy | Terms of Use | About this site