XXL WEB

Seda Yalçın, Ömer Taşkın
ABOUT US, ABOUT YOU?
Seda Yalçın

Ömer Taşkın

	
  Software
Engineer@GG

	
  Software
Engineer@GG
OUTLINE
•   WHY XXL WEB?
•   What is Scalability in Theory?
	
  •   Scalability & Performance Issue
	
  •   How to scale?
•   What is Scalability in Practice?
•   Horizontal (Scale Out)
•   Vertical (Scale Up)
WHY XXL WEB?

Scalability in WEB domain
XXL
	
  web

	
  

What is scalability?

	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
•   What is scalability?
	
  
	
  
•   What is not scalability?
	
  
	
  
•   Scalability != performance, but..
XXL
	
  web

	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  

	
  

Scalability & Performance

Only scalability does not increase the performance,
but increasing performance make scaling easier.
XXL
	
  web

	
   	
  

Scalability & Performance

	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
Question: 100 room, 100 person
	
  
	
  
	
  1- 1 P per room
	
  
	
  
	
  2- 100 P in one room
	
  
	
  
What’s your choice?
XXL
	
  web

Scalability & Performance
XXL
	
  web

Language-oriented?

After 3 days + 10 min.. JJ Then, click ‘make it scalable’.
XXL
	
  web

	
  

	
  

What can I do sometimes?

	
  
	
  
	
  
	
  
	
  
	
  
•   Optimize your code,
	
  
	
  
	
  •   Design for scaling! “It won’t scale, if it’s not to scale”.
	
  •   A couple of language oriented examples.
	
  •   Performance is must for Scaling!
	
  
	
  
•   Use caching Mechanisms
	
  
	
  
•   And surely.. Scale your DB!
Caching Techniques
•  

Store entire page

•  

Store parts of a page

•  

Store SQL queries

•  

Store Complex Results

•  

And Yours

	
  

	
  
Why Cache?
•  

Kind a short-cut

•  

Reducing number of requests

•  

In fact, it’s for not scaling in DB layer

•  

Ok, what if cache is burn out?

•  

Then scale it!

	
  
	
  
That is not all..
Scalability @ DB Layer

With a basic example that shows DB things for scaling
A scaling scenario

•   User actions should be logged.
	
   	
  
	
  
•   Probably records will be bigger than we guess.
A scaling scenario
•  

Scalability Types
•  

Horizontal (Scale Out)

•  

Vertical (Scale Up)
 
	
  
	
  
	
  
	
  
	
  
	
  

	
  

VERTICAL SCALABILITY (SCALE UP)

•  

Adding resources to single node in a system

•  
	
  
	
  
•  
	
  
	
  
•  
	
  
	
  
•  

Bandwidth
	
  
Disc √
	
  
CPU
	
  
Memory
VERTICAL SCALABILITY (SCALE UP)

•  

It’s not enough, isn’t it?
HORIZONTAL SCALABILITY (SCALE out)

•  

Adding new node to system
HORIZONTAL SCALABILITY (SCALE out)

•  

Need a sharding mechanism!
HORIZONTAL SCALABILITY (SCALE out)

•  
	
  
	
  
	
  

First attempt:
	
  Write your own sharding KK
HORIZONTAL SCALABILITY (SCALE out)
HORIZONTAL SCALABILITY (SCALE out)

Disadvantages of MySQL Cluster
	
  
	
  
	
  
•   Does not supports add / remove node while cluster is up.
	
  
	
  
	
  
•   Alter queries does not run on every node. Alter queries have to
	
  run for every node.
HORIZONTAL SCALABILITY (SCALE out)

•  

What we need?
•   Have to be transactional?
	
   	
  
	
  
•   Must data be warranty?
HORIZONTAL SCALABILITY (SCALE out)

•  
	
  
	
  
	
  

Second attempt
	
  •  

MongoDB!
HORIZONTAL SCALABILITY (SCALE out)
HORIZONTAL SCALABILITY (SCALE out)

•  

Disadvantages of mongodb
•   Does not supports transaction
•   Does not supports data guarantee ( >= Mongo 1.8)
Wake Up!
Here we are!

h"p://tr.linkedin.com/in/omertaskin	
  
h"p://tr.linkedin.com/in/sedayalcin	
  
	
  
	
  
h"p://twi"er.com/taskinomer	
  
h"p://twi"er.com/seda_yalcin	
  
REFERANCES
http://www.oracle.com/technetwork/articles/dsl/white-php-part1-355135.html
http://docs.mongodb.org/manual/sharding/
http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html
http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster-limitations.html
http://bobiler.org
Paint Illustrations: Seda Yalçın

XXLWEB