GigaSpaces Scalability Live Demo

33
GigaSpaces Scalability Live Demo

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

Page 1: GigaSpaces Scalability Live Demo

GigaSpaces Scalability Live Demo

Page 2: 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

Page 3: GigaSpaces Scalability Live Demo

®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

Page 4: GigaSpaces Scalability Live Demo

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 4

STEP 1 –

DEPLOY THE DEMO ON THE CLOUD

Page 5: GigaSpaces Scalability Live Demo

®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…

Page 6: GigaSpaces Scalability Live Demo

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 6

STEP 2 –

STOCK DEMO ARCHITECTURE

Page 7: GigaSpaces Scalability Live Demo

®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

Page 8: GigaSpaces Scalability Live Demo

®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)

Page 9: GigaSpaces Scalability Live Demo

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 9

Stock Application Home Page

Stock data exposed via REST

Page 10: GigaSpaces Scalability Live Demo

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 10

Stock Application Home Page

• Map/Reduce query via REST

Page 11: GigaSpaces Scalability Live Demo

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 11

Application Home Page – Statistics

Space (data) statistics

JVM statistics

Web statistics

Page 12: GigaSpaces Scalability Live Demo

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 12

STEP 3 –

WEB AUTO-SCALING

Page 13: GigaSpaces Scalability Live Demo

®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

Page 14: GigaSpaces Scalability Live Demo

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 14

Web Container Auto-Scaling

Load Balancer monitors web availability

Web

Web

Load-Balancer

Page 15: GigaSpaces Scalability Live Demo

®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

Page 16: GigaSpaces Scalability Live Demo

®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.

Page 17: GigaSpaces Scalability Live Demo

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 17

Increase Load – Auto-scale-out

Wait for a machine to start automatically.

Page 18: GigaSpaces Scalability Live Demo

®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

Page 19: GigaSpaces Scalability Live Demo

®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

Page 20: GigaSpaces Scalability Live Demo

®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

Page 21: GigaSpaces Scalability Live Demo

®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

Page 22: GigaSpaces Scalability Live Demo

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 22

STEP 4 –

AUTOMATIC FAILOVER AND

AUTO-RECOVERY

Page 23: GigaSpaces Scalability Live Demo

®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

Page 24: GigaSpaces Scalability Live Demo

®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

Page 25: GigaSpaces Scalability Live Demo

®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

Page 26: GigaSpaces Scalability Live Demo

®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

Page 27: GigaSpaces Scalability Live Demo

®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)

Page 28: GigaSpaces Scalability Live Demo

®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.

Page 29: GigaSpaces Scalability Live Demo

®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:

Page 30: GigaSpaces Scalability Live Demo

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 30

Failover (Web Dashboard)

Switch back to the Web Dashboard.

Note how Backup (blue) becomes Active (green)

Page 31: GigaSpaces Scalability Live Demo

®Copyright 2010 Gigaspaces Ltd. All Rights Reserved 31

Experience Machine Failover

Wait until a new

machine is started

and the Processor

space rebalances.

Page 32: GigaSpaces Scalability Live Demo

®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.

Page 33: GigaSpaces Scalability Live Demo

®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