GigaSpaces Scalability Live Demo

Post on 30-May-2015

1.434 views 1 download

Tags:

description

Experience how XAP scales web servers based on load. Learn how our In-Memory Data Grid performs automatic recovery when a machine failes.

Transcript of GigaSpaces Scalability Live Demo

GigaSpaces Scalability Live Demo

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 2

In this Demo

• Experience automatic scaling based on request throughput

• See how the application fails over and auto-recovers after failure

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved

How to Experience Automatic Scaling

• Deploy the demo on the cloud

• Study the demo architecture

• Web auto-scaling (requests/sec threshold)

• Automatic failover and auto-recovery

3

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 4

STEP 1 –

DEPLOY THE DEMO ON THE CLOUD

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 5

How to Experience Automatic Scaling?

• Click Deploy

• Click Refresh Status

• Wait until application status = Deployed

Expected waiting time: ~7 min

In the meantime let’s study the stock demo architecture…

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 6

STEP 2 –

STOCK DEMO ARCHITECTURE

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 7

Architecture – Processor Space

• Stock feeder simulates stock price changes

• Processor analyzes data as it arrives (price change delta)

Processor(Code + Data)

Write Data

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 8

Stock data exposed to web browser with AJAX

Architecture – Embedded Web Server

Web Load-Balancer

http//: http//:

Read Data (SQL Query),Get Statistics (Admin API)

Write Data Processor(Code + Data)

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 9

Stock Application Home Page

Stock data exposed via REST

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 10

Stock Application Home Page

• Map/Reduce query via REST

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 11

Application Home Page – Statistics

Space (data) statistics

JVM statistics

Web statistics

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 12

STEP 3 –

WEB AUTO-SCALING

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 13

How to Experience Automatic Scaling

1. Wait until application status =

2. Click View Stocks

3. Note the Web Requests/Second gauge

Deployed

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 14

Web Container Auto-Scaling

Load Balancer monitors web availability

Web

Web

Load-Balancer

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 15

Web

Web

Web

Load-Balancer

Web Container Auto-Scaling

A new machine is started when the requests-per-second threshold is breached

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 16

Increase Load – Auto-scale-out

Click View Stocks twice

A total of 3 “View Stocks” pages are open.

Note that the gauge is above threshold.

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 17

Increase Load – Auto-scale-out

Wait for a machine to start automatically.

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 18

Increase Load – Auto-scale-out

When the machine starts, the number of web Processing Units (PUs) increases from 2 to 3

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 19

Decrease Load – Auto-scale-in

Close 2 “View Stocks” pages

(leave only 1 open)

Note the gauge is below threshold

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 20

Decrease Load – Auto-scale-in

Wait until a Web_Container machine is

automatically terminated (scaling in back to 2 machines).

This might take a few minutes

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 21

Step 3 – Recap

Increase load by starting additional web pages Web server scales out

Decrease load by closing the additional pages Web server scales in

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 22

STEP 4 –

AUTOMATIC FAILOVER AND

AUTO-RECOVERY

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved

Automatic Failover of Data Grid

23

Stock updates are replicated to backup

Partition 1Active

Partition 2Backup

Partition 2Active

Partition 1Backup

Write Data

Replication

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved

Automatic Failover of Data Grid

24

When a machine fails, backup becomes primary

Partition 1Active

Partition 2Active

Partition 1Backup

Partition 2Active

Write Data

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved

Automatic Recovery of Data Grid

25

A new machine is started, backups are deployed

Partition 2Backup

Partition 1Backup

Partition 1Active

Partition 2Active

Write Data

Replication

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved

Number of active instances is re-balanced

26

ReplicationPartition 1

Active

Partition 2Backup

Partition 2Active

Partition 1Backup

Write Data

Automatic Recovery of Data Grid

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 27

Start the Monitoring Web Dashboard

1. Click Monitor to start the web dashboard

(works best with Firefox / Chrome)

2. Click Login (anonymous login)

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 28

The Processor Space (Web Dashboard)

Expand ProcessorPU

tree node.

Note each partition

Has a primary (green)

and a backup (blue)

instance.

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 29

Shut Down Machine

Switch back to the main screen,

and click the Shutdown button of one

Web_Container machine:

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 30

Failover (Web Dashboard)

Switch back to the Web Dashboard.

Note how Backup (blue) becomes Active (green)

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 31

Experience Machine Failover

Wait until a new

machine is started

and the Processor

space rebalances.

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 32

Step 4 – Recap

Machine failure New machine starts automaticallyA backup space instance takes over

Machine started

New backup space started

Rebalancing of active instances.

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 33

What This Demo Illustrated

Automatic scaling of the web application based on load

Automatic recovery from machine failures