SlideShare a Scribd company logo
1 of 45
Distributed Systems
and
Scalability Rules
Oleg Tsal-Tsalko
Email: oleg.tsalko@gmail.com
Skype: oleg.tsalko
Twitter: @tsaltsol
What is distributed system?
A distributed system is a collection of independent
computers that coordinate their activity and share
resources and appears to its users as a single coherent
system.
Why do we need distributed
systems?
• Nature of application required distributed
network/system
• Availability/Reliability (no single point of failure)
• Performance (bunch of commodity servers give
more performance that one supercomputer)
• Cost efficient (bunch of commodity servers cost less
than one supercomputer)
Examples
•
•
•
•
•
•
•
•

Telecom networks (telephone/computer networks)
WWW, peer-to-peer networks
Multiplayer online games
Distributed databases
Network file systems
Aircraft control systems
Scientific computing (cluster/grid computing)
Distributed rendering
Distributed systems characteristics
Lack of a global clock
Multiple autonomous components
Components are not shared by all users
Resources may not be accessible
Software runs in concurrent processes on different processors
Multiple Points of control (distributed management)
Multiple Points of failure (fault tolerance)
The structure of the system (network topology, network
latency, number of computers) is not known in advance
• Each computer has only a limited, incomplete view of the system.
•
•
•
•
•
•
•
•
Advantages over centralized
systems
Scalability
Redundancy

•The system can easily be expanded by adding more machines as needed.

•Several machines can provide the same services, so if one is unavailable, work does not stop.

Economics

•A collection of microprocessors offer a better price/performance than mainframes. Low
price/performance ratio: cost effective way to increase computing power.

Reliability

•If one machine crashes, the system as a whole can still survive.

Speed
Incremental growth

•A distributed system may have more total computing power than a mainframe

•Computing power can be added in small increments
Advantages over independent PCs
Data sharing

• Allow many users to access common data

Resource sharing

• Allow shared access to common resources

Communication

• Enhance human-to-human communication

Flexibility

• Spread the workload over the available machines
Parallel computing

Distributed computing

•In parallel
computing, all
processors may have
access to a shared
memory to exchange
information between
processors.

•In distributed
computing, each
processor has its own
private memory
(distributed memory).
Information is
exchanged by passing
messages between the
processors.
Algorithms
Parallel algorithms in shared-memory model
• All computers have access to a shared memory. The algorithm designer chooses the
program executed by each computer.

Parallel algorithms in message-passing model
• The algorithm designer chooses the structure of the network, as well as the program
executed by each computer.

Distributed algorithms in message-passing model
• The algorithm designer only chooses the computer program. All computers run the
same program. The system must work correctly regardless of the structure of the
network.
It appeared that Distributed
Systems have some fundamental
problems!
Byzantine fault-tolerance problem
The objective of Byzantine fault tolerance is to be able
to defend against Byzantine failures, in which
components of a system fail in arbitrary ways

Known algorithms can ensure correct operation only if
<1/3 of the processes are faulty.
Byzantine Generals
and
Two Generals problems

It is proved that there is no solution for these problems other than probabilistic…
Consensus problem
• Agreeing on the identity of leader
• State-machine replication
• Atomic broadcasts
There are number of protocols to solve consensus problem in distributed
systems such as widely used `Paxos consensus protocol` http://en.wikipedia.org/wiki/Paxos_algorithm
Types of distributed systems

Cluster
computing
systems

Grid
computing
systems
Grid computing
Grid computing is the collection of computer
resources from multiple locations to reach a common
goal. What distinguishes grid computing from
conventional high performance computing systems
such as cluster computing is that grids tend to be more
loosely coupled, heterogeneous, and geographically
dispersed.
Cluster computing
Computer clustering relies on a centralized
management approach which makes the nodes
available as orchestrated shared servers. It is distinct
from other approaches such as peer to peer or grid
computing which also use many nodes, but with a far
more distributed nature.
Distributed systems design and
architecture principles
The art of
simplicity

Scaling out
(X/Y/Z-axis)

Aggressive use of
caching

Using messaging
whenever
possible

Redundancy to
achieve HA

Replication

Sharding

Scaling your
database level

Data locality

Consistency

Fault tolerance

CAP theorem
Architecture principles

® Copyright 2012 Gigaspaces Ltd. All Rights
Reserved

18
HA nodes configuration
Active/active (Load
balanced)

• Traffic intended for the failed node is either passed onto an
existing node or load balanced across the remaining nodes.

Active/passive

• Provides a fully redundant instance of each node, which is
only brought online when its associated primary node fails:

Hot standby
Warm standby

Cold standby

• Software components are installed and available on both
primary and secondary nodes.

• The software component is installed and available on
the secondary node. The secondary node is up and
running.
• The secondary node acts as backup of another identical
primary system. It will be installed and configured only
when the primary node breaks down for the first time.
Redundancy as is
•
•
•
•
•
•

Redundant Web/App Servers
Redundant databases
Disk mirroring
Redundant network
Redundant storage network
Redundant electrical power
Redundancy in HA cluster
• Easy start/stop procedures
• Using NAS/SAN shared storage
• App should be able to store it’s state in shared
storage

• App should be able to restart from stored
shared state on another node

• App shouldn’t corrupt data if it crashes or
restarted
Replication
Replication in computing involves sharing information so as to
ensure consistency between redundant resources.
• Primary-backup (master-slave) schema – only primary node
processing requests.
• Multi-primary (multi-master) schema – all nodes are
processing requests simultaneously and distribute state
between each other.
Backup differs from replication in that it saves a copy of data
unchanged for a long period of time. Replicas, on the other
hand, undergo frequent updates and quickly lose any
historical state.
Replication models
• Transactional replication. Synchronous replication to number of nodes.
• State machine replication. Using state machine based on Paxis
algorithm.
• Virtual synchrony (Performance over fault-tolerance). Sending
asynchronous events to other nodes.

• Synchronous replication (Consistency over Performance) - guarantees
"zero data loss" by the means of atomic write operation.
• Asynchronous replication (Performance over Consistency) (Eventual
consistency) - write is considered complete as soon as local storage
acknowledges it. Remote storage is updated, but probably with a
small lag.
Sharding (Partitioning)
Sharding is the process of storing data records across multiple
machines to meet demands of data growth.
Why sharding?
• High query rates can exhaust the CPU capacity of the
server.
• Larger data sets exceed the storage capacity of a single
machine.
• Finally, working set sizes larger than the system’s RAM stress
the I/O capacity of disk drives.
Sharding (Partitioning)
• Sharding reduces the number
of operations each shard
handles.
• Sharding reduces the amount
of data that each server needs
to store.
Data Partitioning Principles
Partitioned Data
Feeder

Virtual Machine

Virtual Machine

Virtual Machine

Back to key
scenarios

Partitioned Data with Backup Per Partition
Feeder
Replication

Replication

Backup 1

Primary 1

Primary 2

Backup 2

Virtual Machine

Virtual Machine

Virtual Machine

Virtual Machine

® Copyright 2012 Gigaspaces Ltd. All Rights Reserved

26
Split-brain problem
When connectivity between nodes in cluster gone
and cluster divided in several parts

Solutions:
• Optimistic approach (Availability over Consistency)
o Leave as is and rely on later resynch (Hazelcast)

• Pessimistic approach (Consistency over Availability)
o Leave only one partition live before connectivity fixed (MongoDB)
Consistency

Strong
Weak

Eventual

• After update completes any subsequent access will
return the updated value.

• The system does not guarantee that subsequent
accesses will return the updated value.

• The storage system guarantees that if no new updates
are made to object eventually all accesses will return
the last updated value.
Eventually consistent
Strong => W + R > N
Weak/Eventual => W + R <= N
Optimized read => R=1, W=N
Optimized write => W=1, R=N
N – number of nodes
W – number of replicas to aknowledge update
R – number of replicas contacted for read
Fault tolerance
(Architecture concepts)

Fault tolerant
system:

Approaches:

• No single point of failure
• Fault isolation
• Roll-back/Roll-forward procedures

• Replication
• Redundancy
• Diversity – several alternative implementations of
some functionality
Fault tolerance
(Design principles)

Design using fault isolated “swimlanes”
Never trust single point of failure
Avoid putting systems in series
Ensure you have “switch on/switch off” for your new functionality
Data locality

Put data closer to clients scaling by Z-axis.
Locate processing units near data to be processed.
BASE
• Basic Availability
• Soft-state
• Eventual consistency

Alternative model to well known ACID which is used in
Distributed Systems to relax strong consistency
constraints in favor to achieve higher Availability
together with Partition Tolerance as per CAP theorem.
CAP theorem
CAP prove
Eric Brewer’s quote
“Because partitions are rare, CAP should allow perfect C and A most of
the time, but when partitions are present or perceived, a strategy that
detects partitions and explicitly accounts for them is in order. This
strategy should have three steps: detect partitions, enter an explicit
partition mode that can limit some operations, and initiate a recovery
process to restore consistency and compensate for mistakes made
during a partition.”
Eric Brewer’s recipe
Design principles

® Copyright 2012 Gigaspaces Ltd. All Rights
Reserved

38
Scaling out (Z/Y/Z axis)
[X-Axis]: Horizontal duplication (design to clone things)
[Y-Axis]: Split by Function, Service or Resource (design to split diff things)
[Z-Axis]: Lookups split (design to split similar things)
The art of simplicity
KISS (Keep it simple). Don’t overengineer a solution.
Simplify solution 3 times over (scope, design, implementation)
Reduce DNS lookups. Reduce objects where possible (Google main page)

Use homogenous networks where possible
Avoid too many traffic redirects
Don’t check your work (avoid defensive programing)
Relax temporal constraints where possible
Aggressive use of caching
Use expires headers
Cache AJAX calls
Leverage Page Caches (Proxy Web Servers)
Utilize Application caches
Use Object Caches (ORM level)

Put caches in their own tier
Caching on different levels
Using messaging whenever
possible
• Communicate asynchronously as
much as possible
• Ensure your message bus can scale
• Avoid overcrowding your message
bus
Scaling your database layer
Denormalize data where possible cause relationships are costly.

Use the right type of lock.
Avoid using multiphase commits and distributed transactions.
Avoid using “select for update” statements.
Don’t select everything.
Thank you
and
questions!
Oleg Tsal-Tsalko
Email: oleg.tsalko@gmail.com
Skype: oleg.tsalko
Twitter: @tsaltsol

® Copyright 2012 Gigaspaces Ltd. All Rights
Reserved

45

More Related Content

What's hot

cloud computing:Types of virtualization
cloud computing:Types of virtualizationcloud computing:Types of virtualization
cloud computing:Types of virtualizationDr.Neeraj Kumar Pandey
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing modelsishmecse13
 
Cloud Computing Principles and Paradigms: 6 on the management of virtual mach...
Cloud Computing Principles and Paradigms: 6 on the management of virtual mach...Cloud Computing Principles and Paradigms: 6 on the management of virtual mach...
Cloud Computing Principles and Paradigms: 6 on the management of virtual mach...Majid Hajibaba
 
advanced computer architesture-conditions of parallelism
advanced computer architesture-conditions of parallelismadvanced computer architesture-conditions of parallelism
advanced computer architesture-conditions of parallelismPankaj Kumar Jain
 
OIT552 Cloud Computing - Question Bank
OIT552 Cloud Computing - Question BankOIT552 Cloud Computing - Question Bank
OIT552 Cloud Computing - Question Bankpkaviya
 
Architectural Design in Software Engineering SE10
Architectural Design in Software Engineering SE10Architectural Design in Software Engineering SE10
Architectural Design in Software Engineering SE10koolkampus
 
Management of I/O request & Communication among devices
Management of I/O request & Communication among devicesManagement of I/O request & Communication among devices
Management of I/O request & Communication among devicesManish Halai
 
Multicast routing protocols in adhoc networks
Multicast routing protocols in adhoc networksMulticast routing protocols in adhoc networks
Multicast routing protocols in adhoc networksPradeep Kumar TS
 
Foult Tolerence In Distributed System
Foult Tolerence In Distributed SystemFoult Tolerence In Distributed System
Foult Tolerence In Distributed SystemRajan Kumar
 
Communication primitives
Communication primitivesCommunication primitives
Communication primitivesStudent
 
Clustering: Large Databases in data mining
Clustering: Large Databases in data miningClustering: Large Databases in data mining
Clustering: Large Databases in data miningZHAO Sam
 
Network Attached Storage (NAS)
Network Attached Storage (NAS)Network Attached Storage (NAS)
Network Attached Storage (NAS)sandeepgodfather
 
Architecture of Mobile Computing
Architecture of Mobile ComputingArchitecture of Mobile Computing
Architecture of Mobile ComputingJAINIK PATEL
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systemssumitjain2013
 

What's hot (20)

cloud computing:Types of virtualization
cloud computing:Types of virtualizationcloud computing:Types of virtualization
cloud computing:Types of virtualization
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing models
 
Cloud Computing Principles and Paradigms: 6 on the management of virtual mach...
Cloud Computing Principles and Paradigms: 6 on the management of virtual mach...Cloud Computing Principles and Paradigms: 6 on the management of virtual mach...
Cloud Computing Principles and Paradigms: 6 on the management of virtual mach...
 
Distributed System ppt
Distributed System pptDistributed System ppt
Distributed System ppt
 
advanced computer architesture-conditions of parallelism
advanced computer architesture-conditions of parallelismadvanced computer architesture-conditions of parallelism
advanced computer architesture-conditions of parallelism
 
OIT552 Cloud Computing - Question Bank
OIT552 Cloud Computing - Question BankOIT552 Cloud Computing - Question Bank
OIT552 Cloud Computing - Question Bank
 
Architectural Design in Software Engineering SE10
Architectural Design in Software Engineering SE10Architectural Design in Software Engineering SE10
Architectural Design in Software Engineering SE10
 
Security Design Principles.ppt
 Security Design Principles.ppt Security Design Principles.ppt
Security Design Principles.ppt
 
Management of I/O request & Communication among devices
Management of I/O request & Communication among devicesManagement of I/O request & Communication among devices
Management of I/O request & Communication among devices
 
Multicast routing protocols in adhoc networks
Multicast routing protocols in adhoc networksMulticast routing protocols in adhoc networks
Multicast routing protocols in adhoc networks
 
3. challenges
3. challenges3. challenges
3. challenges
 
Aca11 bk2 ch9
Aca11 bk2 ch9Aca11 bk2 ch9
Aca11 bk2 ch9
 
Foult Tolerence In Distributed System
Foult Tolerence In Distributed SystemFoult Tolerence In Distributed System
Foult Tolerence In Distributed System
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Communication primitives
Communication primitivesCommunication primitives
Communication primitives
 
Clustering: Large Databases in data mining
Clustering: Large Databases in data miningClustering: Large Databases in data mining
Clustering: Large Databases in data mining
 
Unit 4
Unit 4Unit 4
Unit 4
 
Network Attached Storage (NAS)
Network Attached Storage (NAS)Network Attached Storage (NAS)
Network Attached Storage (NAS)
 
Architecture of Mobile Computing
Architecture of Mobile ComputingArchitecture of Mobile Computing
Architecture of Mobile Computing
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
 

Viewers also liked

Distributed Systems: scalability and high availability
Distributed Systems: scalability and high availabilityDistributed Systems: scalability and high availability
Distributed Systems: scalability and high availabilityRenato Lucindo
 
Icmens 2009 L100
Icmens 2009   L100Icmens 2009   L100
Icmens 2009 L100khalid_nitt
 
Daad March 8th 2010
Daad   March 8th 2010Daad   March 8th 2010
Daad March 8th 2010khalid_nitt
 
A Compositional Encoding for the Asynchronous Pi-Calculus into the Join-Calculus
A Compositional Encoding for the Asynchronous Pi-Calculus into the Join-CalculusA Compositional Encoding for the Asynchronous Pi-Calculus into the Join-Calculus
A Compositional Encoding for the Asynchronous Pi-Calculus into the Join-Calculussmennicke
 
FSLN12 Kick-Off, TU Braunschweig
FSLN12 Kick-Off, TU BraunschweigFSLN12 Kick-Off, TU Braunschweig
FSLN12 Kick-Off, TU Braunschweigalexanderperl
 
Digests for the book "Scalability Rules: 50 Principles for Scaling Web Sites"
Digests for the book "Scalability Rules: 50 Principles for Scaling Web Sites"Digests for the book "Scalability Rules: 50 Principles for Scaling Web Sites"
Digests for the book "Scalability Rules: 50 Principles for Scaling Web Sites"Cyril Wang
 
State Machine Design and Synthesis
State Machine Design and SynthesisState Machine Design and Synthesis
State Machine Design and SynthesisAbhilash Nair
 
Practical Byzantine Fault Tolerance
Practical Byzantine Fault TolerancePractical Byzantine Fault Tolerance
Practical Byzantine Fault ToleranceSuman Karumuri
 
Distributed Consensus: Making the Impossible Possible
Distributed Consensus: Making the Impossible PossibleDistributed Consensus: Making the Impossible Possible
Distributed Consensus: Making the Impossible PossibleC4Media
 
Building Scalable Organizations
Building Scalable OrganizationsBuilding Scalable Organizations
Building Scalable Organizationsmfisher5kavika
 
Block Chains and Consensus Algos
Block Chains and Consensus AlgosBlock Chains and Consensus Algos
Block Chains and Consensus AlgosJerry David Chan
 
Distributed Systems Theory for Mere Mortals
Distributed Systems Theory for Mere MortalsDistributed Systems Theory for Mere Mortals
Distributed Systems Theory for Mere MortalsEnsar Basri Kahveci
 
From Mainframe to Microservice: An Introduction to Distributed Systems
From Mainframe to Microservice: An Introduction to Distributed SystemsFrom Mainframe to Microservice: An Introduction to Distributed Systems
From Mainframe to Microservice: An Introduction to Distributed SystemsTyler Treat
 
RESIGN REPUBLIC: An education technology platform by Ali. R. Khan
RESIGN REPUBLIC: An education technology platform by Ali. R. KhanRESIGN REPUBLIC: An education technology platform by Ali. R. Khan
RESIGN REPUBLIC: An education technology platform by Ali. R. KhanAli Rahman Khan
 
Replication and Synchronization Algorithms for Distributed Databases - Lena W...
Replication and Synchronization Algorithms for Distributed Databases - Lena W...Replication and Synchronization Algorithms for Distributed Databases - Lena W...
Replication and Synchronization Algorithms for Distributed Databases - Lena W...distributed matters
 
The State of HBase Replication
The State of HBase ReplicationThe State of HBase Replication
The State of HBase ReplicationHBaseCon
 
Distributed algorithms for big data @ GeeCon
Distributed algorithms for big data @ GeeConDistributed algorithms for big data @ GeeCon
Distributed algorithms for big data @ GeeConDuyhai Doan
 

Viewers also liked (20)

Scalability Design Principles - Internal Session
Scalability Design Principles - Internal SessionScalability Design Principles - Internal Session
Scalability Design Principles - Internal Session
 
Distributed Systems: scalability and high availability
Distributed Systems: scalability and high availabilityDistributed Systems: scalability and high availability
Distributed Systems: scalability and high availability
 
Icmens 2009 L100
Icmens 2009   L100Icmens 2009   L100
Icmens 2009 L100
 
Daad March 8th 2010
Daad   March 8th 2010Daad   March 8th 2010
Daad March 8th 2010
 
A Compositional Encoding for the Asynchronous Pi-Calculus into the Join-Calculus
A Compositional Encoding for the Asynchronous Pi-Calculus into the Join-CalculusA Compositional Encoding for the Asynchronous Pi-Calculus into the Join-Calculus
A Compositional Encoding for the Asynchronous Pi-Calculus into the Join-Calculus
 
FSLN12 Kick-Off, TU Braunschweig
FSLN12 Kick-Off, TU BraunschweigFSLN12 Kick-Off, TU Braunschweig
FSLN12 Kick-Off, TU Braunschweig
 
Digests for the book "Scalability Rules: 50 Principles for Scaling Web Sites"
Digests for the book "Scalability Rules: 50 Principles for Scaling Web Sites"Digests for the book "Scalability Rules: 50 Principles for Scaling Web Sites"
Digests for the book "Scalability Rules: 50 Principles for Scaling Web Sites"
 
Blockchain Hub Seminar
Blockchain Hub SeminarBlockchain Hub Seminar
Blockchain Hub Seminar
 
State Machine Design and Synthesis
State Machine Design and SynthesisState Machine Design and Synthesis
State Machine Design and Synthesis
 
Practical Byzantine Fault Tolerance
Practical Byzantine Fault TolerancePractical Byzantine Fault Tolerance
Practical Byzantine Fault Tolerance
 
Distributed Consensus: Making the Impossible Possible
Distributed Consensus: Making the Impossible PossibleDistributed Consensus: Making the Impossible Possible
Distributed Consensus: Making the Impossible Possible
 
Building Scalable Organizations
Building Scalable OrganizationsBuilding Scalable Organizations
Building Scalable Organizations
 
Block Chains and Consensus Algos
Block Chains and Consensus AlgosBlock Chains and Consensus Algos
Block Chains and Consensus Algos
 
Distributed Systems Theory for Mere Mortals
Distributed Systems Theory for Mere MortalsDistributed Systems Theory for Mere Mortals
Distributed Systems Theory for Mere Mortals
 
PBFT
PBFTPBFT
PBFT
 
From Mainframe to Microservice: An Introduction to Distributed Systems
From Mainframe to Microservice: An Introduction to Distributed SystemsFrom Mainframe to Microservice: An Introduction to Distributed Systems
From Mainframe to Microservice: An Introduction to Distributed Systems
 
RESIGN REPUBLIC: An education technology platform by Ali. R. Khan
RESIGN REPUBLIC: An education technology platform by Ali. R. KhanRESIGN REPUBLIC: An education technology platform by Ali. R. Khan
RESIGN REPUBLIC: An education technology platform by Ali. R. Khan
 
Replication and Synchronization Algorithms for Distributed Databases - Lena W...
Replication and Synchronization Algorithms for Distributed Databases - Lena W...Replication and Synchronization Algorithms for Distributed Databases - Lena W...
Replication and Synchronization Algorithms for Distributed Databases - Lena W...
 
The State of HBase Replication
The State of HBase ReplicationThe State of HBase Replication
The State of HBase Replication
 
Distributed algorithms for big data @ GeeCon
Distributed algorithms for big data @ GeeConDistributed algorithms for big data @ GeeCon
Distributed algorithms for big data @ GeeCon
 

Similar to Distributed systems and scalability rules

Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systemsvampugani
 
Chapter Introductionn to distributed system .pptx
Chapter Introductionn to distributed system .pptxChapter Introductionn to distributed system .pptx
Chapter Introductionn to distributed system .pptxTekle12
 
Cluster computing ppt
Cluster computing pptCluster computing ppt
Cluster computing pptDC Graphics
 
Intro to distributed systems
Intro to distributed systemsIntro to distributed systems
Intro to distributed systemsAhmed Soliman
 
Apos week 1 4
Apos week 1   4Apos week 1   4
Apos week 1 4alixafar
 
CS8603_Notes_003-1_edubuzz360.pdf
CS8603_Notes_003-1_edubuzz360.pdfCS8603_Notes_003-1_edubuzz360.pdf
CS8603_Notes_003-1_edubuzz360.pdfKishaKiddo
 
An operating system for multicore and clouds: mechanism and implementation
An operating system for multicore and clouds: mechanism and implementationAn operating system for multicore and clouds: mechanism and implementation
An operating system for multicore and clouds: mechanism and implementationMohanadarshan Vivekanandalingam
 
introduction to cloud computing for college.pdf
introduction to cloud computing for college.pdfintroduction to cloud computing for college.pdf
introduction to cloud computing for college.pdfsnehan789
 
Introduction to Parallel Computing
Introduction to Parallel ComputingIntroduction to Parallel Computing
Introduction to Parallel ComputingAkhila Prabhakaran
 
EMBEDDED OS
EMBEDDED OSEMBEDDED OS
EMBEDDED OSAJAL A J
 
Cluster computing
Cluster computingCluster computing
Cluster computingMegha yadav
 

Similar to Distributed systems and scalability rules (20)

Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systems
 
Clusters
ClustersClusters
Clusters
 
Chapter Introductionn to distributed system .pptx
Chapter Introductionn to distributed system .pptxChapter Introductionn to distributed system .pptx
Chapter Introductionn to distributed system .pptx
 
CLUSTER COMPUTING
CLUSTER COMPUTINGCLUSTER COMPUTING
CLUSTER COMPUTING
 
Introduction
IntroductionIntroduction
Introduction
 
Cluster
ClusterCluster
Cluster
 
CCUnit1.pdf
CCUnit1.pdfCCUnit1.pdf
CCUnit1.pdf
 
Cluster computing ppt
Cluster computing pptCluster computing ppt
Cluster computing ppt
 
Cluster computing
Cluster computingCluster computing
Cluster computing
 
Intro to distributed systems
Intro to distributed systemsIntro to distributed systems
Intro to distributed systems
 
Apos week 1 4
Apos week 1   4Apos week 1   4
Apos week 1 4
 
CS8603_Notes_003-1_edubuzz360.pdf
CS8603_Notes_003-1_edubuzz360.pdfCS8603_Notes_003-1_edubuzz360.pdf
CS8603_Notes_003-1_edubuzz360.pdf
 
An operating system for multicore and clouds: mechanism and implementation
An operating system for multicore and clouds: mechanism and implementationAn operating system for multicore and clouds: mechanism and implementation
An operating system for multicore and clouds: mechanism and implementation
 
chap-0 .ppt
chap-0 .pptchap-0 .ppt
chap-0 .ppt
 
introduction to cloud computing for college.pdf
introduction to cloud computing for college.pdfintroduction to cloud computing for college.pdf
introduction to cloud computing for college.pdf
 
Introduction to Parallel Computing
Introduction to Parallel ComputingIntroduction to Parallel Computing
Introduction to Parallel Computing
 
EMBEDDED OS
EMBEDDED OSEMBEDDED OS
EMBEDDED OS
 
Cluster Computing
Cluster ComputingCluster Computing
Cluster Computing
 
Cluster computing
Cluster computingCluster computing
Cluster computing
 
Distributed Systems.pptx
Distributed Systems.pptxDistributed Systems.pptx
Distributed Systems.pptx
 

More from Oleg Tsal-Tsalko

Developer on a mission (Devoxx UA 2021)
Developer on a mission (Devoxx UA 2021)Developer on a mission (Devoxx UA 2021)
Developer on a mission (Devoxx UA 2021)Oleg Tsal-Tsalko
 
From Streams to Reactive Streams
From Streams to Reactive StreamsFrom Streams to Reactive Streams
From Streams to Reactive StreamsOleg Tsal-Tsalko
 
JUG UA AdoptJSR participation
JUG UA AdoptJSR participationJUG UA AdoptJSR participation
JUG UA AdoptJSR participationOleg Tsal-Tsalko
 
Develop modern apps using Spring ecosystem at time of BigData
Develop modern apps using Spring ecosystem at time of BigData Develop modern apps using Spring ecosystem at time of BigData
Develop modern apps using Spring ecosystem at time of BigData Oleg Tsal-Tsalko
 
Java 8 date & time javaday2014
Java 8 date & time javaday2014Java 8 date & time javaday2014
Java 8 date & time javaday2014Oleg Tsal-Tsalko
 
Enterprise Integration Patterns
Enterprise Integration PatternsEnterprise Integration Patterns
Enterprise Integration PatternsOleg Tsal-Tsalko
 
JUG involvment in JCP and AdopJSR program
JUG involvment in JCP and AdopJSR programJUG involvment in JCP and AdopJSR program
JUG involvment in JCP and AdopJSR programOleg Tsal-Tsalko
 

More from Oleg Tsal-Tsalko (14)

Developer on a mission (Devoxx UA 2021)
Developer on a mission (Devoxx UA 2021)Developer on a mission (Devoxx UA 2021)
Developer on a mission (Devoxx UA 2021)
 
Developer on a mission
Developer on a missionDeveloper on a mission
Developer on a mission
 
From Streams to Reactive Streams
From Streams to Reactive StreamsFrom Streams to Reactive Streams
From Streams to Reactive Streams
 
Java 9 Jigsaw HackDay
Java 9 Jigsaw HackDayJava 9 Jigsaw HackDay
Java 9 Jigsaw HackDay
 
JUG UA AdoptJSR participation
JUG UA AdoptJSR participationJUG UA AdoptJSR participation
JUG UA AdoptJSR participation
 
Develop modern apps using Spring ecosystem at time of BigData
Develop modern apps using Spring ecosystem at time of BigData Develop modern apps using Spring ecosystem at time of BigData
Develop modern apps using Spring ecosystem at time of BigData
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
 
Lambdas HOL
Lambdas HOLLambdas HOL
Lambdas HOL
 
Java 8 date & time javaday2014
Java 8 date & time javaday2014Java 8 date & time javaday2014
Java 8 date & time javaday2014
 
Java 8 date & time
Java 8 date & timeJava 8 date & time
Java 8 date & time
 
Get ready for spring 4
Get ready for spring 4Get ready for spring 4
Get ready for spring 4
 
Enterprise Integration Patterns
Enterprise Integration PatternsEnterprise Integration Patterns
Enterprise Integration Patterns
 
Next stop: Spring 4
Next stop: Spring 4Next stop: Spring 4
Next stop: Spring 4
 
JUG involvment in JCP and AdopJSR program
JUG involvment in JCP and AdopJSR programJUG involvment in JCP and AdopJSR program
JUG involvment in JCP and AdopJSR program
 

Recently uploaded

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 

Recently uploaded (20)

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 

Distributed systems and scalability rules

  • 1. Distributed Systems and Scalability Rules Oleg Tsal-Tsalko Email: oleg.tsalko@gmail.com Skype: oleg.tsalko Twitter: @tsaltsol
  • 2. What is distributed system? A distributed system is a collection of independent computers that coordinate their activity and share resources and appears to its users as a single coherent system.
  • 3. Why do we need distributed systems? • Nature of application required distributed network/system • Availability/Reliability (no single point of failure) • Performance (bunch of commodity servers give more performance that one supercomputer) • Cost efficient (bunch of commodity servers cost less than one supercomputer)
  • 4. Examples • • • • • • • • Telecom networks (telephone/computer networks) WWW, peer-to-peer networks Multiplayer online games Distributed databases Network file systems Aircraft control systems Scientific computing (cluster/grid computing) Distributed rendering
  • 5. Distributed systems characteristics Lack of a global clock Multiple autonomous components Components are not shared by all users Resources may not be accessible Software runs in concurrent processes on different processors Multiple Points of control (distributed management) Multiple Points of failure (fault tolerance) The structure of the system (network topology, network latency, number of computers) is not known in advance • Each computer has only a limited, incomplete view of the system. • • • • • • • •
  • 6. Advantages over centralized systems Scalability Redundancy •The system can easily be expanded by adding more machines as needed. •Several machines can provide the same services, so if one is unavailable, work does not stop. Economics •A collection of microprocessors offer a better price/performance than mainframes. Low price/performance ratio: cost effective way to increase computing power. Reliability •If one machine crashes, the system as a whole can still survive. Speed Incremental growth •A distributed system may have more total computing power than a mainframe •Computing power can be added in small increments
  • 7. Advantages over independent PCs Data sharing • Allow many users to access common data Resource sharing • Allow shared access to common resources Communication • Enhance human-to-human communication Flexibility • Spread the workload over the available machines
  • 8. Parallel computing Distributed computing •In parallel computing, all processors may have access to a shared memory to exchange information between processors. •In distributed computing, each processor has its own private memory (distributed memory). Information is exchanged by passing messages between the processors.
  • 9. Algorithms Parallel algorithms in shared-memory model • All computers have access to a shared memory. The algorithm designer chooses the program executed by each computer. Parallel algorithms in message-passing model • The algorithm designer chooses the structure of the network, as well as the program executed by each computer. Distributed algorithms in message-passing model • The algorithm designer only chooses the computer program. All computers run the same program. The system must work correctly regardless of the structure of the network.
  • 10. It appeared that Distributed Systems have some fundamental problems!
  • 11. Byzantine fault-tolerance problem The objective of Byzantine fault tolerance is to be able to defend against Byzantine failures, in which components of a system fail in arbitrary ways Known algorithms can ensure correct operation only if <1/3 of the processes are faulty.
  • 12. Byzantine Generals and Two Generals problems It is proved that there is no solution for these problems other than probabilistic…
  • 13. Consensus problem • Agreeing on the identity of leader • State-machine replication • Atomic broadcasts There are number of protocols to solve consensus problem in distributed systems such as widely used `Paxos consensus protocol` http://en.wikipedia.org/wiki/Paxos_algorithm
  • 14. Types of distributed systems Cluster computing systems Grid computing systems
  • 15. Grid computing Grid computing is the collection of computer resources from multiple locations to reach a common goal. What distinguishes grid computing from conventional high performance computing systems such as cluster computing is that grids tend to be more loosely coupled, heterogeneous, and geographically dispersed.
  • 16. Cluster computing Computer clustering relies on a centralized management approach which makes the nodes available as orchestrated shared servers. It is distinct from other approaches such as peer to peer or grid computing which also use many nodes, but with a far more distributed nature.
  • 17. Distributed systems design and architecture principles The art of simplicity Scaling out (X/Y/Z-axis) Aggressive use of caching Using messaging whenever possible Redundancy to achieve HA Replication Sharding Scaling your database level Data locality Consistency Fault tolerance CAP theorem
  • 18. Architecture principles ® Copyright 2012 Gigaspaces Ltd. All Rights Reserved 18
  • 19. HA nodes configuration Active/active (Load balanced) • Traffic intended for the failed node is either passed onto an existing node or load balanced across the remaining nodes. Active/passive • Provides a fully redundant instance of each node, which is only brought online when its associated primary node fails: Hot standby Warm standby Cold standby • Software components are installed and available on both primary and secondary nodes. • The software component is installed and available on the secondary node. The secondary node is up and running. • The secondary node acts as backup of another identical primary system. It will be installed and configured only when the primary node breaks down for the first time.
  • 20. Redundancy as is • • • • • • Redundant Web/App Servers Redundant databases Disk mirroring Redundant network Redundant storage network Redundant electrical power
  • 21. Redundancy in HA cluster • Easy start/stop procedures • Using NAS/SAN shared storage • App should be able to store it’s state in shared storage • App should be able to restart from stored shared state on another node • App shouldn’t corrupt data if it crashes or restarted
  • 22. Replication Replication in computing involves sharing information so as to ensure consistency between redundant resources. • Primary-backup (master-slave) schema – only primary node processing requests. • Multi-primary (multi-master) schema – all nodes are processing requests simultaneously and distribute state between each other. Backup differs from replication in that it saves a copy of data unchanged for a long period of time. Replicas, on the other hand, undergo frequent updates and quickly lose any historical state.
  • 23. Replication models • Transactional replication. Synchronous replication to number of nodes. • State machine replication. Using state machine based on Paxis algorithm. • Virtual synchrony (Performance over fault-tolerance). Sending asynchronous events to other nodes. • Synchronous replication (Consistency over Performance) - guarantees "zero data loss" by the means of atomic write operation. • Asynchronous replication (Performance over Consistency) (Eventual consistency) - write is considered complete as soon as local storage acknowledges it. Remote storage is updated, but probably with a small lag.
  • 24. Sharding (Partitioning) Sharding is the process of storing data records across multiple machines to meet demands of data growth. Why sharding? • High query rates can exhaust the CPU capacity of the server. • Larger data sets exceed the storage capacity of a single machine. • Finally, working set sizes larger than the system’s RAM stress the I/O capacity of disk drives.
  • 25. Sharding (Partitioning) • Sharding reduces the number of operations each shard handles. • Sharding reduces the amount of data that each server needs to store.
  • 26. Data Partitioning Principles Partitioned Data Feeder Virtual Machine Virtual Machine Virtual Machine Back to key scenarios Partitioned Data with Backup Per Partition Feeder Replication Replication Backup 1 Primary 1 Primary 2 Backup 2 Virtual Machine Virtual Machine Virtual Machine Virtual Machine ® Copyright 2012 Gigaspaces Ltd. All Rights Reserved 26
  • 27. Split-brain problem When connectivity between nodes in cluster gone and cluster divided in several parts Solutions: • Optimistic approach (Availability over Consistency) o Leave as is and rely on later resynch (Hazelcast) • Pessimistic approach (Consistency over Availability) o Leave only one partition live before connectivity fixed (MongoDB)
  • 28. Consistency Strong Weak Eventual • After update completes any subsequent access will return the updated value. • The system does not guarantee that subsequent accesses will return the updated value. • The storage system guarantees that if no new updates are made to object eventually all accesses will return the last updated value.
  • 29. Eventually consistent Strong => W + R > N Weak/Eventual => W + R <= N Optimized read => R=1, W=N Optimized write => W=1, R=N N – number of nodes W – number of replicas to aknowledge update R – number of replicas contacted for read
  • 30. Fault tolerance (Architecture concepts) Fault tolerant system: Approaches: • No single point of failure • Fault isolation • Roll-back/Roll-forward procedures • Replication • Redundancy • Diversity – several alternative implementations of some functionality
  • 31. Fault tolerance (Design principles) Design using fault isolated “swimlanes” Never trust single point of failure Avoid putting systems in series Ensure you have “switch on/switch off” for your new functionality
  • 32. Data locality Put data closer to clients scaling by Z-axis. Locate processing units near data to be processed.
  • 33. BASE • Basic Availability • Soft-state • Eventual consistency Alternative model to well known ACID which is used in Distributed Systems to relax strong consistency constraints in favor to achieve higher Availability together with Partition Tolerance as per CAP theorem.
  • 36. Eric Brewer’s quote “Because partitions are rare, CAP should allow perfect C and A most of the time, but when partitions are present or perceived, a strategy that detects partitions and explicitly accounts for them is in order. This strategy should have three steps: detect partitions, enter an explicit partition mode that can limit some operations, and initiate a recovery process to restore consistency and compensate for mistakes made during a partition.”
  • 38. Design principles ® Copyright 2012 Gigaspaces Ltd. All Rights Reserved 38
  • 39. Scaling out (Z/Y/Z axis) [X-Axis]: Horizontal duplication (design to clone things) [Y-Axis]: Split by Function, Service or Resource (design to split diff things) [Z-Axis]: Lookups split (design to split similar things)
  • 40. The art of simplicity KISS (Keep it simple). Don’t overengineer a solution. Simplify solution 3 times over (scope, design, implementation) Reduce DNS lookups. Reduce objects where possible (Google main page) Use homogenous networks where possible Avoid too many traffic redirects Don’t check your work (avoid defensive programing) Relax temporal constraints where possible
  • 41. Aggressive use of caching Use expires headers Cache AJAX calls Leverage Page Caches (Proxy Web Servers) Utilize Application caches Use Object Caches (ORM level) Put caches in their own tier
  • 43. Using messaging whenever possible • Communicate asynchronously as much as possible • Ensure your message bus can scale • Avoid overcrowding your message bus
  • 44. Scaling your database layer Denormalize data where possible cause relationships are costly. Use the right type of lock. Avoid using multiphase commits and distributed transactions. Avoid using “select for update” statements. Don’t select everything.
  • 45. Thank you and questions! Oleg Tsal-Tsalko Email: oleg.tsalko@gmail.com Skype: oleg.tsalko Twitter: @tsaltsol ® Copyright 2012 Gigaspaces Ltd. All Rights Reserved 45