Slide 1

Slide 1 text

Most Powerful High Availability Load Balancing Sep, 29, 2012 YAPC::Asia 2012 @riywo

Slide 2

Slide 2 text

@riywo

Slide 3

Slide 3 text

http://www.publicdomainpictures.net/view-image.php?image=4314&picture=t-shirt-image

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Talk about.... * Why is this good? * Why is this bad?

Slide 7

Slide 7 text

HALB

Slide 8

Slide 8 text

What?

Slide 9

Slide 9 text

LB Server Server Server Server

Slide 10

Slide 10 text

HA Server Server Server Server ✗ Health Check

Slide 11

Slide 11 text

Same!

Slide 12

Slide 12 text

Where?

Slide 13

Slide 13 text

HA LB Web Web Web Web User

Slide 14

Slide 14 text

HA LB DB DB DB DB Web

Slide 15

Slide 15 text

HA LB API API API API Web

Slide 16

Slide 16 text

Anywhere!

Slide 17

Slide 17 text

How?

Slide 18

Slide 18 text

BIG-IP ServerIron

Slide 19

Slide 19 text

LVS

Slide 20

Slide 20 text

HAProxy

Slide 21

Slide 21 text

mod_proxy

Slide 22

Slide 22 text

nginx

Slide 23

Slide 23 text

ELB

Slide 24

Slide 24 text

MyDNS

Slide 25

Slide 25 text

Pros/Cons

Slide 26

Slide 26 text

Pros Cons H/W Inline (DSR) Powerful Difficult Expensive Proxy Inline (DSR) Easy to use Performance DNS No proxy Performance Difficult

Slide 27

Slide 27 text

Pros Cons H/W Inline (DSR) Powerful Difficult Expensive Proxy Inline (DSR) Easy to use Performance DNS No proxy Performance Difficult

Slide 28

Slide 28 text

DNS

Slide 29

Slide 29 text

No Proxy

Slide 30

Slide 30 text

DNS DB DB DB DB Web 1 2 Weighted-DNS RoundRobin HA LB

Slide 31

Slide 31 text

Cache

Slide 32

Slide 32 text

DNS DB DB DB DB Web 2 Cache 1 3

Slide 33

Slide 33 text

Cache is Difficult

Slide 34

Slide 34 text

DNS DB DB DB DB Web Cache ✗ Health Check

Slide 35

Slide 35 text

DNS DB DB DB DB Web Cache ✗ Health Check Inconsistent

Slide 36

Slide 36 text

Solution

Slide 37

Slide 37 text

Client DNS

Slide 38

Slide 38 text

DNS DB DB DB DB Web ✗ Health Check

Slide 39

Slide 39 text

Too many Health Check

Slide 40

Slide 40 text

DB DB DB DB DNS Web ✗ Health Check DNS Web DNS Web Health CheckHealth Check

Slide 41

Slide 41 text

Solution

Slide 42

Slide 42 text

Eventual Consistent

Slide 43

Slide 43 text

DB DB DB DB DNS Web ✗ DNS Web DNS Web Health Check DNS 2 Async 1

Slide 44

Slide 44 text

How?

Slide 45

Slide 45 text

DB DB DB DB ✗ MyDNS Web Health Check MyDNS 1 2 Replication MyDNS Web MyDNS Web

Slide 46

Slide 46 text

Good Points

Slide 47

Slide 47 text

* Clients know all info * Eventual Consistent * Any Application:)

Slide 48

Slide 48 text

Bad Points

Slide 49

Slide 49 text

* Too much... * Async difficult

Slide 50

Slide 50 text

Join us! * Perl Mongers * Operation Engineers

Slide 51

Slide 51 text

Join us! * Perl Mongers * Operation Engineers * Baseball Players :)

Slide 52

Slide 52 text

Thanks!

Slide 53

Slide 53 text

@riywo blog.riywo.com weblog.riywo.com