LOAD BALANCING Dawid Królak. Intro Problem Model OSI Layer 2 Layer 4-7 Reverse Proxy.

20
LOAD BALANCING Dawid Królak

Transcript of LOAD BALANCING Dawid Królak. Intro Problem Model OSI Layer 2 Layer 4-7 Reverse Proxy.

Page 1: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

LOAD BALANCING

Dawid Królak

Page 2: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Intro

Problem Model OSI Layer 2 Layer 4-7 Reverse Proxy

Page 3: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Problem

How to maintain large amount of queries, requests?

Buy a new faster, batter hardware?Buy faster links?

Reduce service?

Use load balancing methods!

Page 4: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Advantages

Use hardware that is available but unused at this time.

Use cheaper hardware. First properly configured easier to

upgrade, maintain. Scalability. It`s all about speed.

Page 5: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Disadvantages

Difficult to configure. Need more IT knowledge.

Page 6: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Levels of Load Balancing

Layer 2 OSI Model (Link aggregation) Layer 4 OSI Model (TCP/UDP) Layer 7 OSI Model (Reverse Proxy)

Page 7: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Model OSI

Application

Presentation

Session

Transport

Network

Data Link

Physical

Page 8: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Data link – link aggregation

Many physical links can be seen as one logical.

Defined by IEEE 802.3ad standard.

Page 9: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Caution!

Standard IEEE 802.3ad is not defining Load Balancing!

To load balancing we need to use algorithms!

But without link aggregation we can`t talk about layer 2 load balancing.

Page 10: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Link Aggregation

Features: Load Sharing (using available links) Automatic configuration Deterministic (predictable, controllable) Frame order (frame order is preserved)

Page 11: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Limiations

We need to use additional algorithms to use load balancing

Works only between two devices. Same speed on links (should be).

Page 12: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Additional info

Some algorhithms can be found at:http://www.google.sk/search?q=layer+2+load+balancing+algorithms

Page 13: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Layer 4 load balancing

Layer-4 load balancing is to distribute requests to the servers at transport layer, such as TCP, UDP and SCTP transport protocol.

We know one address, load balancer is switching us to one of many servers.

Pure 4-layer load balancing is being displacing by layer4-7 load balancing.

Page 14: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Layer4-7 load balancing

Problems: One service can be run on multiple

logical machines. Logical machine can be built from many

physical machines.

Main role of load balancing is to distribute requests to multiple logic

machines/services.

Page 15: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Layer 4-7 load balancing

Advantages: Scalability We can scale that part of system that we

need. Nowadays many servers are supporting

this. (database, www, webservices, dns)

Page 16: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Layer 4-7 load balancing

Page 17: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Reverse proxy

Reverse proxy is special server proxy type.

Typically set at front of web servers. This proxy can distribute connections to

a different address. Fast and easy to configure in popular

webservers (apache, lighttp)

Page 18: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Load Balancing layer 2-4-7

Load balancing 2 and 4-7 can be used at the same time.

Load balancer can distribute requests to other load balancer

Load balancing is used in cloud computing. Load balancer and services can be runned at one

physical and logical machine, like casual PC /but there is no sense to do it/

It`s better to set some load balancers instead of buying new better faster and more expensive hardware.

Page 20: LOAD BALANCING Dawid Królak. Intro  Problem  Model OSI  Layer 2  Layer 4-7  Reverse Proxy.

Finish.

Any Questions?

Thank you for your attention.

Ďakujem za pozornosť.Dziękuję za uwagę.