high availability high performance - drupal...high availability high performance how to sleep...

44
High Availability High Performance How to sleep without the server-crash-fear Michael Schmid [email protected] @schnitzel

Upload: others

Post on 04-Jun-2020

48 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

High AvailabilityHigh Performance

How to sleep without the server-crash-fear

Michael [email protected]

@schnitzel

Page 2: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

High Availability

•no „Single Point of Failure“

•Redundancy

Page 3: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

High Performance

•Response times

•Caching

•HTML

•Data (serialized)

•Scalable

• adding easy and fast more servers

Page 4: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Scalable & Redundancy Server System

Page 6: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Goal

Page 8: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Two Webserver

Page 9: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Apache

• APC

• precompiled

• keeps files in memory

Page 10: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

nginx

• lightweight Webserver

• Reverse Proxy

• Loadbalander

• can be faster

• more knowledge needed

Page 11: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Two Webserver

MySQL?

Page 13: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

dedicated MySQL

Page 14: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

second Webserver

Page 15: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

How to Access?

?

Page 16: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Loadbalancer

Page 17: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Loadbalancer

•passes through requests

• „Man in the middle“

Page 18: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Loadbalancer

Page 19: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

second Loadbalancer

Page 20: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

second Loadbalancer

files?

Page 21: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

NFS

NFS

Page 22: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

NFS

fallback? NFS

Page 23: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

GlusterFS

Page 24: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

GlusterFS

•Distributed Filesystem

• multiple Server/Clients

• auto-heal

• split-brain

• Not soo fast

Page 25: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

GlusterFS

Page 26: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

second GlusterFS

Page 27: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

MySQL

fallback?

Page 28: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

MySQL Master/Slave

•Master

•WRITE

•Slave

•READ

•Hot Spare

•Slave become Master

Page 29: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

MySQL

Page 30: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

MySQL

Page 31: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Memcache

memcache?

Page 32: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Memcache

•Replaces “_chache“ tables

•Key / Value Store

•Fast

•Memory only

•own Server

Page 33: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Memcache

Page 34: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Memcache

Page 35: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Varnish

Varnish Varnish

Page 36: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Varnish

•Reverse Proxy

•Caches full HTML Pages

•Hates Cookies/Sessions

•No SSL

•Drupal 6

•Pressflow

•Drupal 7 & 8

•in Core

Page 37: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability
Page 38: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

ESI(Edge Side Includes)

Page 39: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability
Page 40: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability
Page 41: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability
Page 42: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

ttl=1h

pass

Page 43: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

ESI<esi:include src="http://www.osec.ch/userblock" />

•Cache whole page, load only small parts

•Varnish / Squid / Nginx (SSI)

•Drupal Module

•blocks, panel panes, context module

Page 44: High Availability High Performance - Drupal...High Availability High Performance How to sleep without the server-crash-fear Michael Schmid michael@amazeelabs.com @schnitzel High Availability

Questions?

Michael [email protected]

@schnitzel