109. Arquitecturas Escalables con GX

40
#GX24 And Performance SCALABILITY Gonzalo Gallotti @gonzalogallotti

description

Arquitecturas Escalables con GX

Transcript of 109. Arquitecturas Escalables con GX

Page 1: 109. Arquitecturas Escalables con GX

#GX24 #GX24 And Performance SCALABILITY

Gonzalo Gallotti @gonzalogallotti

Page 2: 109. Arquitecturas Escalables con GX
Page 3: 109. Arquitecturas Escalables con GX

Oops

“Server busy” “Timeout”

500 – Server ERROR

Lots of users!

Page 4: 109. Arquitecturas Escalables con GX

?????

Page 5: 109. Arquitecturas Escalables con GX

I knew it! SCALING

OUT!

LOAD

BAL

ANC

ER

Page 6: 109. Arquitecturas Escalables con GX

SCALE OUT!

AVAILABILITY FAULT TOLERANCE PREDICTABILITY

Page 7: 109. Arquitecturas Escalables con GX

#GX24

ARCHITECTURE

CACHING

PUSH NOTIFICATIONS WEBSESSION STATE

STORAGE

LOAD BALANCING DATABASE REPLICATION

NOT SO FAST!

Page 8: 109. Arquitecturas Escalables con GX

CACHING

DATABASE REPLICATION

WEBSESSION STATE

STORAGE

LOAD BALANCING

PUSH NOTIFICATIONS

HOSTING

Page 9: 109. Arquitecturas Escalables con GX

UNA

TRES

DOS STORAGE CACHE

PUSH NOTIFICATIONS

Page 10: 109. Arquitecturas Escalables con GX

#GX24

STORAGE

Page 11: 109. Arquitecturas Escalables con GX

WEB SERVER

GET

DATABASE

SAVE

QUERY

(FETCH

BINARY)

HARDRIVE

RESPONSE

GET IMAGE

Page 12: 109. Arquitecturas Escalables con GX

#GX24

ISSUES

Database size growth WebServer serving

Dynamic content… ok! Static content… WHY?

Bandwidth Static content allocated in Web Server hard drive.. Bad for Scaling!

Page 13: 109. Arquitecturas Escalables con GX

WEB SERVER

GET

DATABASE

QUERY (URL)

RESPONSE

STORAGE PROVIDER

GET IMAGE

Page 14: 109. Arquitecturas Escalables con GX

#GX24

AMAZON S3

High availability Redundancy Caching Performance Scalability Easy setup Unlimited storage!

Page 15: 109. Arquitecturas Escalables con GX

#GX24

CHEAP!

50GB

1.000.000 GET Request

50 GB Transfer OUT

USD 6 / month

Page 16: 109. Arquitecturas Escalables con GX

#GX24

GX STORAGE PROVIDER

Page 17: 109. Arquitecturas Escalables con GX

#GX24

TIGHT INTEGRATION

BLOB

AND MORE! XML READER & WRITER

IMAGE

FILE DATA TYPE AUDIO, VIDEO

LIKE IT!

Page 18: 109. Arquitecturas Escalables con GX

#GX24

Security

Security Access Public Private

Automatic signed urls with expiration time!

Ex: http://futboluy.s3.amazonaws.com/penarol/badge.png?AWSAc

cessKeyId=AKIAI..& Signature=Npg..& Expires=11751

Page 19: 109. Arquitecturas Escalables con GX

CACHING

Page 20: 109. Arquitecturas Escalables con GX

“Web apps typically have a read/write ratio of somewhere between 80/20 and 90/10”

Cal Henderson (Flickr)

Page 21: 109. Arquitecturas Escalables con GX

#GX24

WHY

Lower CPU usage Lower Database usage Better response times Faster, more scalable apps

Lower costs

Page 22: 109. Arquitecturas Escalables con GX

TODAY

Page 23: 109. Arquitecturas Escalables con GX

WEB SERVER

SD CACHE BD CACHE

Page 24: 109. Arquitecturas Escalables con GX
Page 25: 109. Arquitecturas Escalables con GX

2000

DB CACHING ON

4x 500

DB CACHING OFF

THROUGHPUT (FUY .NET GX APP)

REQ/S

Page 26: 109. Arquitecturas Escalables con GX

SERVICE LEVEL CACHE SMART DEVICES CACHE

DATABASE CACHE

Page 27: 109. Arquitecturas Escalables con GX

EXTERNAL WEBSERVER

MY WEBSERVER

<< WS SOAP >>

1 – 2 seconds

COMPARE TEAMS (PROCEDURE)

GET FROM

CACHE

Page 28: 109. Arquitecturas Escalables con GX

#GX24

SERVICE LEVEL CACHE HTTP ACCELERATION

SMART DEVICES CACHE DATABASE CACHE

Page 29: 109. Arquitecturas Escalables con GX

WEB SERVER

• nginx • SQUID • VARNISH • (CDN) AWS CloudFront

HTTP ACCELERATOR

Page 30: 109. Arquitecturas Escalables con GX

Client A

HTTP Request

WEB SERVER

HTTP Request

Japan HTTP Response Response

SAVE IN CACHE CDN

(Japan)

Page 31: 109. Arquitecturas Escalables con GX

Client B

CDN (Japan)

HTTP Request

HTTP Response

GET FROM CACHE

WEB SERVER

Page 32: 109. Arquitecturas Escalables con GX
Page 33: 109. Arquitecturas Escalables con GX

#GX24

WHERE CACHE DATA IS STORED?

DATABASE CACHE SMART DEVICES CACHE SERVICE LEVEL CACHE

Page 34: 109. Arquitecturas Escalables con GX
Page 35: 109. Arquitecturas Escalables con GX
Page 36: 109. Arquitecturas Escalables con GX

PUSH NOTIFICATIONS

Page 37: 109. Arquitecturas Escalables con GX

2.000.000 push notifications 150.000 push per Month

50.000 per second FREE!

Page 38: 109. Arquitecturas Escalables con GX

#GX24

PUSH NOTIFICATIONS

Page 39: 109. Arquitecturas Escalables con GX

CACHING

DATABASE REPLICATION

WEBSESSION STATE

STORAGE

LOAD BALANCING

PUSH NOTIFICATIONS

HOSTING

Page 40: 109. Arquitecturas Escalables con GX

Gonzalo Gallotti– @gonzalogallotti