xxlweb

30
XXL WEB Seda Yalçın, Ömer Taşkın

Upload: oemer-taskin

Post on 06-Aug-2015

440 views

Category:

Technology


0 download

TRANSCRIPT

XXL WEB

Seda Yalçın, Ömer Taşkın

ABOUT US, ABOUT YOU?

 Software Engineer@GG

Seda Yalçın

 Software Engineer@GG

Ömer Taşkın

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

With a basic example that shows DB things for scaling

Scalability @ DB Layer

A scaling scenario

•      •  

User actions should be logged.  Probably records will be bigger than we guess.

•   Scalability Types

•   Horizontal (Scale Out)

•   Vertical (Scale Up)

A scaling scenario

 VERTICAL SCALABILITY (SCALE UP)              •   Adding resources to single node in a system

•      •      •      •  

Bandwidth  Disc √  CPU  Memory

•   It’s not enough, isn’t it?

VERTICAL SCALABILITY (SCALE UP)

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 KK

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