SlideShare una empresa de Scribd logo
1 de 29
Descargar para leer sin conexión
Confidential
Load Balancing with HAProxy and MySQL
!
!
July 9, 2014
Alex Yu

alex@severalnines.com
Copyright Severalnines AB
Webinar Housekeeping
!This webinar is being recorded
!A link to the recording & slides will be posted on severalnines.com
!We welcome questions: enter questions into the chat box and we
will respond at the end of the presentation
!Think of something later?
! Email Severalnines at info@severalnines.com
2
Copyright Severalnines AB
Agenda
!What Is HAProxy?
!SQL Load Balancing with HAProxy
! Failure detection with MySQL
!Fault Tolerance with HAProxy
! Active/Passive setup
!Deployment Scenarios
! MySQL Cluster, Galera Cluster and MySQL Replication
!Load Balancing Alternatives
3
Copyright Severalnines AB
Why Load Balance?
!Optimising server utilisation
! Queuing and throttling
!Maximise availability
! No SPOF
!Maximise throughput
! Distribute workload across a set of servers
!Scalability
! Site traffic grows
! Add DB servers to provide more throughput
4
LB
DB DB DB …
!Reliable High Performance TCP/HTTP Load Balancer
! v1.5 stable released June 2014
! Native SSL support, IPv6, full HTTP keepalive, HTTP Compression …
! v1.4 most deployed and stable version, released Feb 2010
! client-side keep alive, TCP speedups, source base stickiness …
! Single Process Event-Driven. Can easily saturate 10Gb link with a single instance
! 108 000 session/s, http://www.haproxy.org/10g.html (2009)
!Reverse Proxy
! load balancing, scaling out, failover (health checks)
!High traffic sites like
! reddit, DISQUS, GitHub, Imgur, StackOverflow/Server Fault, Instagram …
Copyright Severalnines AB
HAProxy?
5
Copyright Severalnines AB
SQL Load Balancing for MySQL
!Configuration file
! Sections; global, defaults, frontend, backend, listen
! /etc/haproxy/haproxy.cfg
!Global (process wide)
6
MySQL
[WSREP]
Galera Replication (Synchronous)
LB
MySQL
[WSREP]
MySQL
[WSREP]
R/W R/W R/W
Client Client Client
global

log 127.0.0.1 local0
pidfile /var/run/haproxy.pid
daemon
user nobody
group nobody
stats socket /tmp/haproxy.socket …
node HAProxy_1
description HAProxy 1
maxconn 40000
spread-checks 3
quiet
Copyright Severalnines AB
SQL Load Balancing for MySQL (cont.)
!defaults
7
MySQL
[WSREP]
Galera Replication (Synchronous)
LB
MySQL
[WSREP]
MySQL
[WSREP]
R/W R/W R/W
Client Client Client
defaults
log global
mode tcp
maxconn 40000
option dontlognull
option tcp-smart-accept
option tcp-smart-connect
option redispatch
retries 3
timeout queue 3500ms
timeout connect 3500ms
timeout client 120s
timeout server 120s
Copyright Severalnines AB
SQL Load Balancing for MySQL (cont.)
!listen (frontend + backend)
8
listen s9s1_33306_defaul_LB
mode tcp

bind *:33306
timeout client 60000ms
timeout server 60000ms
balance leastconn
option httpchk
#option allbackups
default-server port 9200 inter 2s downinter 5s rise 3 fall 2 slowstart 60s maxconn 256
maxqueue 128 weight 100
server db1 10.0.3.70:3306 check
server db2 10.0.3.60:3306 check
server db3 10.0.3.50:3306 check
Copyright Severalnines AB
SQL Load Balancing for MySQL (cont.)
!listen (stats ui)
9
userlist STATSUSERS
group admin users admin
user admin insecure-password admin
!
listen admin_page 0.0.0.0:9600
mode http
stats enable
stats refresh 60s
stats uri /
acl AuthOkay_ReadOnly http_auth(STATSUSERS)
acl AuthOkay_Admin http_auth_group(STATSUSERS) admin
stats http-request auth realm admin_page unless AuthOkay_ReadOnly
Copyright Severalnines AB
10
!Session rate
! number of new connections per second
!Sessions
! current number of sessions/connections
!LastChk
! health check
!Wght
! server weight
Copyright Severalnines AB
MySQL Health Checks
11
!Built-in MySQL health check
! option mysql-check user <username>
! Sends two MySQL packages
! Authentication and Quit
! No errors unless MySQL server is down
!Complete HTTP Request
! option httpchk
! Response: HTTP/1.1 200 OK
! Check Host and/or MySQL server state
! Galera Node State
MySQL
[WSREP]
Galera Replication (Synchronous)
LB
MySQL
[WSREP]
MySQL
[WSREP]
R/W R/W R/W
Client Client Client
Copyright Severalnines AB
MySQL Health Checks (cont.)
12
!Galera Node
! Check 1: Get node state
! SYNCED or DONOR
! Check 2: If Node is a “DONOR”
! Get the SST method
! xtrabackup
! Return “200 OK”
! rsync or mysqldump
! Return “503 Service Unavailable” Galera Node State
Copyright Severalnines AB
MySQL Health Checks (cont.)
13
!xinetd service
! mysqlchk.sh (shell script)
! spams syslog by default
! log_on_success =
#/etc/xinetd.d/mysqlchk
# default: on
# description: mysqlchk
service mysqlchk
{
flags = REUSE
socket_type = stream
port = 9200
wait = no
user = nobody
server = /usr/local/bin/mysqlchk.sh
log_on_failure += USERID
disable = no
#only_from = 0.0.0.0/0
per_source = UNLIMITED
}
Copyright Severalnines AB
Network Tuning
!TCP tuning
14
#/etc/sysctl.conf
net.ipv4.ip_nonlocal_bind=1
net.ipv4.tcp_tw_reuse=1 # reuse TIME-WAIT sockets
net.ipv4.ip_local_port_range=1024 65023 # increase max num of ports
net.ipv4.tcp_max_syn_backlog=40000 #Increase the number of outstanding syn requests
net.ipv4.tcp_max_tw_buckets=400000 # Maximal number of timewait sockets
net.ipv4.tcp_max_orphans=60000
net.ipv4.tcp_max_syn_backlog=40000 # TCP SYN Flood Protection
net.ipv4.tcp_synack_retries=3 # TCP SYN Flood Protection
net.core.somaxconn=40000 # burst connection rate
net.ipv4.tcp_fin_timeout=5 # how long to keep sockets in FIN-WAIT-2
Copyright Severalnines AB
Fault Tolerance for HAProxy
15
Client
HAProxy 1
MySQL
 MySQL
 MySQL

IP: 10.10.10.20
Copyright Severalnines AB
Fault Tolerance for HAProxy (cont.)
!Active/Passive IP failover
! keepalived
! VRRP protocol provides router/IP failover
!VIP, “floating IP”: 10.10.10.10
! net.ipv4.ip_nonlocal_bind=1
!Master - HAProxy 1
! IP: 10.10.10.20
!Backup - HAProxy 2
! IP: 10.10.10.30
16
Copyright Severalnines AB
Fault Tolerance for HAProxy (cont.)
!keepalived configuration file
17
#/etc/keepalived/keepalived.conf
vrrp_script chk_haproxy {
script "killall -0 haproxy" # verify the pid existence
interval 2 # check every 2 seconds
weight 2 # adjust priority by this weight
}
vrrp_instance VI_1 {
interface eth0
state MASTER
virtual_router_id 51 # ID for this route
priority 101 # 101 on master

# 100 on backup
virtual_ipaddress {
10.10.10.10 # the virtual IP
}
track_script {
chk_haproxy
}
}
Copyright Severalnines AB
ClusterControl HAProxy + Keepalived
!Install HAProxy with our admin scripts
! http://www.severalnines.com/blog/using-haproxy-database-clusters
18
$ git clone https://github.com/severalnines/s9s-admin.git
$ cd s9s-admin/cluster/
# install haproxy1 on 10.10.10.20 listening on 33306
$ ./s9s_haproxy --install -i 1 -n <ip db1>,<ip db2>,<ip db3> -h10.10.10.20
# install haproxy2 on 10.10.10.30 listening on 33306
$ ./s9s_haproxy --install -i 1 -n <ip db1>,<ip db2>,<ip db3> -h10.10.10.30
# scale out db nodes on haproxy1
$ ./s9s_haproxy --add-node -i 1 -h 10.10.10.20 -n <ip db4>
$ ./s9s_haproxy --add-node -i 1 -h 10.10.10.20 -n <ip db5>
# scale out db nodes on haproxy2
$ ./s9s_haproxy --add-node -i 1 -h 10.10.10.30 -n <ip db4>
$ ./s9s_haproxy --add-node -i 1 -h 10.10.10.30 -n <ip db5>
Copyright Severalnines AB
ClusterControl HAProxy + Keepalived (cont.)
!Deployment and configuration automated from ClusterControl
19
Copyright Severalnines AB
ClusterControl HAProxy + Keepalived (cont.)
20
Copyright Severalnines AB
Deployment Scenarios
21
!MySQL Cluster / NDB Engine
! Active/Active, Shared nothing architecture
! SQL, Data and MGMT Nodes
! HAProxy co-located with MGMT Nodes
! MGMT is a light weight process
! Re-use “idle” servers
! Connections originate from HAProxy server
! Additional latency
! App Server <-> HAProxy <-> SQL Node <-> Data Node
NDB Data
Node
NDB Data
Node
(MGMT)
HAProxy
(MGMT)
HAProxy
SQL Node

MySQL
Server
SQL Node

MySQL
Server
Copyright Severalnines AB
Deployment Scenarios (cont.)
22
NDB Data
Node
NDB Data
Node
!MySQL Cluster / NDB Engine
! Active/Active, Shared nothing architecture
! SQL, Data and MGMT Nodes
! HAProxy co-located with App servers
! No extra latency
! Extra load on app servers
! Health check loads on SQL nodes from all LBs
! Alt: MySQL Connector/J’s JDBC driver
! jdbc:mysql:loadbalance://host-1,host-2,…host-n/database?
loadBalanceBlacklistTimeout=5000
! Config changes propagate to all app servers
(App)
HAProxy
(App)
HAProxy
SQL Node

MySQL
Server
SQL Node

MySQL
Server
Copyright Severalnines AB
Deployment Scenarios (cont.)
23
NDB Data
Node
NDB Data
Node
!MySQL Cluster / NDB Engine
! Active/Active, Shared nothing architecture
! SQL, Data and MGMT Nodes
! HAProxy co-located with SQL nodes
! No extra latency
! Extra load on SQL nodes
! Do not use JDBC load balancing
! VIP
(App) (App)
SQL Node

MySQL
Server
SQL Node

MySQL
Server
HAProxy HAProxy
…
Copyright Severalnines AB
Deployment Scenarios (cont.)
24
MySQL Slave
MySQL
Master
!MySQL Replication Master/Slave
! 1 Master for Writes
! N Slaves for Reads
! Separate front and backends configs for Master and Slaves
!ex: backend configuration for Slaves
HAProxy
MySQL Slave
MySQL Slave
Writes
Reads
frontend front_reads
mode tcp
bind 192.168.100.110:3316
default_backend cluster_reads


backend cluster_reads
mode tcp
balance roundrobin
server Slave1 10.10.10.30:3306 check
server Slave2 10.10.10.40:3306 check
Copyright Severalnines AB
Deployment Scenarios (cont.)
25
!Galera Cluster
! Synchronous Replication, Read & Write to any Node
! Cluster wide optimistic locking
! Higher probability for “deadlocks”
! Pessimistic locking on the Node
MySQL
[WSREP]
Galera Replication (Synchronous)
LB
MySQL
[WSREP]
MySQL
[WSREP]
R/W R/W R/W
Client Client Client
Copyright Severalnines AB
Deployment Scenarios (cont.)
26
!Galera Cluster
! Synchronous Replication, Read & Write to all Nodes
! Cluster wide optimistic locking
! Higher probability for “deadlocks”
! Pessimistic locking on the Node
MySQL
[WSREP]
Galera Replication (Synchronous)
LB
MySQL
[WSREP]
MySQL
[WSREP]
R/W R/W R/W
Client Client Client
Copyright Severalnines AB
Deployment Scenarios (cont.)
27
MySQL
[WSREP]
Galera Replication (Synchronous)
LB
MySQL
[WSREP]
MySQL
[WSREP]
R/W R/W R/W
Client Client Client
listen s9s1_33307_LB1
bind *:33307
mode tcp
timeout client 60000ms
timeout server 60000ms
balance leastconn
option httpchk
default-server port 9200 inter 2s <…>
server db1 10.0.3.70:3306 check
server db2 10.0.3.60:3306 check backup
server db3 10.0.3.50:3306 check backup
!Handle “dead locks”
! Write to only one Node - Use HAProxy
! Expect deadlocks and make sure applications
handles it properly. Retry the transaction.
! wsrep_retry_autocommit=1
! Changes to the App code to minimise data hotspots.
Copyright Severalnines AB
Alternatives
!MySQL’s Connector/J JDBC driver
!jdbc:mysql:loadbalance://host-1,host-2,…
!PHP mysqlnd
! http://www.php.net/manual/en/intro.mysqlnd-ms.php
!Oracle’s MySQL Proxy 0.84
! http://dev.mysql.com/downloads/mysql-proxy/
!SkySQL’s MaxScale 1.0.0. beta
! https://github.com/skysql/MaxScale
!ProxySQL
! https://github.com/renecannao/proxysql
!Pen 0.24.0
! http://morestuff.siag.nu/category/pen/
28
Copyright Severalnines AB
Thank You!
!Tutorial – MySQL Load Balancing with HAProxy
! http://www.severalnines.com/resources/clustercontrol-mysql-haproxy-load-
balancing-tutorial
!Severalnines Blog
! www.severalnines.com/blog
!s9s-admin tools
! https://github.com/severalnines/s9s-admin
!More Questions? Contact us at:
! info@severalnines.com
29

Más contenido relacionado

La actualidad más candente

Solving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsSolving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsAlexander Korotkov
 
High availability virtualization with proxmox
High availability virtualization with proxmoxHigh availability virtualization with proxmox
High availability virtualization with proxmoxOriol Izquierdo Vibalda
 
HA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and KeepalivedHA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and KeepalivedGanapathi Kandaswamy
 
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorialMySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorialFrederic Descamps
 
ProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewRené Cannaò
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
 
Containers Anywhere with OpenShift by Red Hat
Containers Anywhere with OpenShift by Red HatContainers Anywhere with OpenShift by Red Hat
Containers Anywhere with OpenShift by Red HatAmazon Web Services
 
Ceph Performance and Sizing Guide
Ceph Performance and Sizing GuideCeph Performance and Sizing Guide
Ceph Performance and Sizing GuideJose De La Rosa
 
Ceph Introduction 2017
Ceph Introduction 2017  Ceph Introduction 2017
Ceph Introduction 2017 Karan Singh
 
Ceph Day Melbourne - Troubleshooting Ceph
Ceph Day Melbourne - Troubleshooting Ceph Ceph Day Melbourne - Troubleshooting Ceph
Ceph Day Melbourne - Troubleshooting Ceph Ceph Community
 
Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2Claus Ibsen
 
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화OpenStack Korea Community
 
Testing Persistent Storage Performance in Kubernetes with Sherlock
Testing Persistent Storage Performance in Kubernetes with SherlockTesting Persistent Storage Performance in Kubernetes with Sherlock
Testing Persistent Storage Performance in Kubernetes with SherlockScyllaDB
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMario Beck
 
Proxysql sharding
Proxysql shardingProxysql sharding
Proxysql shardingMarco Tusa
 
Percona Xtrabackup - Highly Efficient Backups
Percona Xtrabackup - Highly Efficient BackupsPercona Xtrabackup - Highly Efficient Backups
Percona Xtrabackup - Highly Efficient BackupsMydbops
 
MySQL Monitoring with Zabbix
MySQL Monitoring with ZabbixMySQL Monitoring with Zabbix
MySQL Monitoring with ZabbixFromDual GmbH
 

La actualidad más candente (20)

Solving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsSolving PostgreSQL wicked problems
Solving PostgreSQL wicked problems
 
High availability virtualization with proxmox
High availability virtualization with proxmoxHigh availability virtualization with proxmox
High availability virtualization with proxmox
 
InnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick FiguresInnoDB Locking Explained with Stick Figures
InnoDB Locking Explained with Stick Figures
 
HA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and KeepalivedHA Deployment Architecture with HAProxy and Keepalived
HA Deployment Architecture with HAProxy and Keepalived
 
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorialMySQL InnoDB Cluster and Group Replication in a nutshell  hands-on tutorial
MySQL InnoDB Cluster and Group Replication in a nutshell hands-on tutorial
 
ProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management Overview
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0
 
Containers Anywhere with OpenShift by Red Hat
Containers Anywhere with OpenShift by Red HatContainers Anywhere with OpenShift by Red Hat
Containers Anywhere with OpenShift by Red Hat
 
Ceph Performance and Sizing Guide
Ceph Performance and Sizing GuideCeph Performance and Sizing Guide
Ceph Performance and Sizing Guide
 
Ansible 101
Ansible 101Ansible 101
Ansible 101
 
Ceph Introduction 2017
Ceph Introduction 2017  Ceph Introduction 2017
Ceph Introduction 2017
 
Ceph Day Melbourne - Troubleshooting Ceph
Ceph Day Melbourne - Troubleshooting Ceph Ceph Day Melbourne - Troubleshooting Ceph
Ceph Day Melbourne - Troubleshooting Ceph
 
Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2
 
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화
 
Apache Kafka Best Practices
Apache Kafka Best PracticesApache Kafka Best Practices
Apache Kafka Best Practices
 
Testing Persistent Storage Performance in Kubernetes with Sherlock
Testing Persistent Storage Performance in Kubernetes with SherlockTesting Persistent Storage Performance in Kubernetes with Sherlock
Testing Persistent Storage Performance in Kubernetes with Sherlock
 
MySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB ClusterMySQL InnoDB Cluster and NDB Cluster
MySQL InnoDB Cluster and NDB Cluster
 
Proxysql sharding
Proxysql shardingProxysql sharding
Proxysql sharding
 
Percona Xtrabackup - Highly Efficient Backups
Percona Xtrabackup - Highly Efficient BackupsPercona Xtrabackup - Highly Efficient Backups
Percona Xtrabackup - Highly Efficient Backups
 
MySQL Monitoring with Zabbix
MySQL Monitoring with ZabbixMySQL Monitoring with Zabbix
MySQL Monitoring with Zabbix
 

Similar a How To Set Up SQL Load Balancing with HAProxy - Slides

Anton Moldovan "Building an efficient replication system for thousands of ter...
Anton Moldovan "Building an efficient replication system for thousands of ter...Anton Moldovan "Building an efficient replication system for thousands of ter...
Anton Moldovan "Building an efficient replication system for thousands of ter...Fwdays
 
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - SlidesSeveralnines
 
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsightOptimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsightHBaseCon
 
High Availability for OpenStack
High Availability for OpenStackHigh Availability for OpenStack
High Availability for OpenStackKamesh Pemmaraju
 
Four Ways to Improve ASP .NET Performance and Scalability
 Four Ways to Improve ASP .NET Performance and Scalability Four Ways to Improve ASP .NET Performance and Scalability
Four Ways to Improve ASP .NET Performance and ScalabilityAlachisoft
 
HBaseCon 2015: HBase 2.0 and Beyond Panel
HBaseCon 2015: HBase 2.0 and Beyond PanelHBaseCon 2015: HBase 2.0 and Beyond Panel
HBaseCon 2015: HBase 2.0 and Beyond PanelHBaseCon
 
실시간 서비스 플랫폼 개발 사례
실시간 서비스 플랫폼 개발 사례실시간 서비스 플랫폼 개발 사례
실시간 서비스 플랫폼 개발 사례John Kim
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011Mike Willbanks
 
A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)Flowdock
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBXESUG
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefMatt Ray
 
Openstack HA
Openstack HAOpenstack HA
Openstack HAYong Luo
 
Self Created Load Balancer for MTA on AWS
Self Created Load Balancer for MTA on AWSSelf Created Load Balancer for MTA on AWS
Self Created Load Balancer for MTA on AWSsharu1204
 
Blue host openstacksummit_2013
Blue host openstacksummit_2013Blue host openstacksummit_2013
Blue host openstacksummit_2013Jun Park
 
Blue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environmentBlue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environmentOpenStack Foundation
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - DeploymentFabio Akita
 
Where is my scalable api?
Where is my scalable api?Where is my scalable api?
Where is my scalable api?Altoros
 
Clug 2011 March web server optimisation
Clug 2011 March  web server optimisationClug 2011 March  web server optimisation
Clug 2011 March web server optimisationgrooverdan
 
Arquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWS
Arquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWSArquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWS
Arquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWSAmazon Web Services LATAM
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersoazabir
 

Similar a How To Set Up SQL Load Balancing with HAProxy - Slides (20)

Anton Moldovan "Building an efficient replication system for thousands of ter...
Anton Moldovan "Building an efficient replication system for thousands of ter...Anton Moldovan "Building an efficient replication system for thousands of ter...
Anton Moldovan "Building an efficient replication system for thousands of ter...
 
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
9 DevOps Tips for Going in Production with Galera Cluster for MySQL - Slides
 
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsightOptimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
Optimizing Apache HBase for Cloud Storage in Microsoft Azure HDInsight
 
High Availability for OpenStack
High Availability for OpenStackHigh Availability for OpenStack
High Availability for OpenStack
 
Four Ways to Improve ASP .NET Performance and Scalability
 Four Ways to Improve ASP .NET Performance and Scalability Four Ways to Improve ASP .NET Performance and Scalability
Four Ways to Improve ASP .NET Performance and Scalability
 
HBaseCon 2015: HBase 2.0 and Beyond Panel
HBaseCon 2015: HBase 2.0 and Beyond PanelHBaseCon 2015: HBase 2.0 and Beyond Panel
HBaseCon 2015: HBase 2.0 and Beyond Panel
 
실시간 서비스 플랫폼 개발 사례
실시간 서비스 플랫폼 개발 사례실시간 서비스 플랫폼 개발 사례
실시간 서비스 플랫폼 개발 사례
 
MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011MNPHP Scalable Architecture 101 - Feb 3 2011
MNPHP Scalable Architecture 101 - Feb 3 2011
 
A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBX
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
 
Openstack HA
Openstack HAOpenstack HA
Openstack HA
 
Self Created Load Balancer for MTA on AWS
Self Created Load Balancer for MTA on AWSSelf Created Load Balancer for MTA on AWS
Self Created Load Balancer for MTA on AWS
 
Blue host openstacksummit_2013
Blue host openstacksummit_2013Blue host openstacksummit_2013
Blue host openstacksummit_2013
 
Blue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environmentBlue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environment
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
Where is my scalable api?
Where is my scalable api?Where is my scalable api?
Where is my scalable api?
 
Clug 2011 March web server optimisation
Clug 2011 March  web server optimisationClug 2011 March  web server optimisation
Clug 2011 March web server optimisation
 
Arquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWS
Arquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWSArquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWS
Arquitetura Hibrida - Integrando seu Data Center com a Nuvem da AWS
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
 

Más de Severalnines

Cloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaSCloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaSSeveralnines
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudSeveralnines
 
Working with the Moodle Database: The Basics
Working with the Moodle Database: The BasicsWorking with the Moodle Database: The Basics
Working with the Moodle Database: The BasicsSeveralnines
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSeveralnines
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...Severalnines
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBSeveralnines
 
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlWebinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlSeveralnines
 
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Severalnines
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Severalnines
 
Disaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBDisaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBSeveralnines
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseSeveralnines
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBSeveralnines
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerSeveralnines
 
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifePolyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifeSeveralnines
 
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Severalnines
 
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLWebinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLSeveralnines
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningSeveralnines
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBSeveralnines
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Severalnines
 
Webinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilityWebinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilitySeveralnines
 

Más de Severalnines (20)

Cloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaSCloud's future runs through Sovereign DBaaS
Cloud's future runs through Sovereign DBaaS
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
 
Working with the Moodle Database: The Basics
Working with the Moodle Database: The BasicsWorking with the Moodle Database: The Basics
Working with the Moodle Database: The Basics
 
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDBSysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
SysAdmin Working from Home? Tips to Automate MySQL, MariaDB, Postgres & MongoDB
 
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
(slides) Polyglot persistence: utilizing open source databases as a Swiss poc...
 
Webinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDBWebinar slides: How to Migrate from Oracle DB to MariaDB
Webinar slides: How to Migrate from Oracle DB to MariaDB
 
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControlWebinar slides: How to Automate & Manage PostgreSQL with ClusterControl
Webinar slides: How to Automate & Manage PostgreSQL with ClusterControl
 
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
Webinar slides: How to Manage Replication Failover Processes for MySQL, Maria...
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
 
Disaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDBDisaster Recovery Planning for MySQL & MariaDB
Disaster Recovery Planning for MySQL & MariaDB
 
MariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash CourseMariaDB Performance Tuning Crash Course
MariaDB Performance Tuning Crash Course
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDB
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona Server
 
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket KnifePolyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
Polyglot Persistence Utilizing Open Source Databases as a Swiss Pocket Knife
 
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
Webinar slides: Free Monitoring (on Steroids) for MySQL, MariaDB, PostgreSQL ...
 
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQLWebinar slides: An Introduction to Performance Monitoring for PostgreSQL
Webinar slides: An Introduction to Performance Monitoring for PostgreSQL
 
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance TuningWebinar slides: Our Guide to MySQL & MariaDB Performance Tuning
Webinar slides: Our Guide to MySQL & MariaDB Performance Tuning
 
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDBWebinar slides: Migrating to Galera Cluster for MySQL and MariaDB
Webinar slides: Migrating to Galera Cluster for MySQL and MariaDB
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?
 
Webinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High AvailabilityWebinar slides: Designing Open Source Databases for High Availability
Webinar slides: Designing Open Source Databases for High Availability
 

Último

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
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
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 

How To Set Up SQL Load Balancing with HAProxy - Slides

  • 1. Confidential Load Balancing with HAProxy and MySQL ! ! July 9, 2014 Alex Yu
 alex@severalnines.com
  • 2. Copyright Severalnines AB Webinar Housekeeping !This webinar is being recorded !A link to the recording & slides will be posted on severalnines.com !We welcome questions: enter questions into the chat box and we will respond at the end of the presentation !Think of something later? ! Email Severalnines at info@severalnines.com 2
  • 3. Copyright Severalnines AB Agenda !What Is HAProxy? !SQL Load Balancing with HAProxy ! Failure detection with MySQL !Fault Tolerance with HAProxy ! Active/Passive setup !Deployment Scenarios ! MySQL Cluster, Galera Cluster and MySQL Replication !Load Balancing Alternatives 3
  • 4. Copyright Severalnines AB Why Load Balance? !Optimising server utilisation ! Queuing and throttling !Maximise availability ! No SPOF !Maximise throughput ! Distribute workload across a set of servers !Scalability ! Site traffic grows ! Add DB servers to provide more throughput 4 LB DB DB DB …
  • 5. !Reliable High Performance TCP/HTTP Load Balancer ! v1.5 stable released June 2014 ! Native SSL support, IPv6, full HTTP keepalive, HTTP Compression … ! v1.4 most deployed and stable version, released Feb 2010 ! client-side keep alive, TCP speedups, source base stickiness … ! Single Process Event-Driven. Can easily saturate 10Gb link with a single instance ! 108 000 session/s, http://www.haproxy.org/10g.html (2009) !Reverse Proxy ! load balancing, scaling out, failover (health checks) !High traffic sites like ! reddit, DISQUS, GitHub, Imgur, StackOverflow/Server Fault, Instagram … Copyright Severalnines AB HAProxy? 5
  • 6. Copyright Severalnines AB SQL Load Balancing for MySQL !Configuration file ! Sections; global, defaults, frontend, backend, listen ! /etc/haproxy/haproxy.cfg !Global (process wide) 6 MySQL [WSREP] Galera Replication (Synchronous) LB MySQL [WSREP] MySQL [WSREP] R/W R/W R/W Client Client Client global
 log 127.0.0.1 local0 pidfile /var/run/haproxy.pid daemon user nobody group nobody stats socket /tmp/haproxy.socket … node HAProxy_1 description HAProxy 1 maxconn 40000 spread-checks 3 quiet
  • 7. Copyright Severalnines AB SQL Load Balancing for MySQL (cont.) !defaults 7 MySQL [WSREP] Galera Replication (Synchronous) LB MySQL [WSREP] MySQL [WSREP] R/W R/W R/W Client Client Client defaults log global mode tcp maxconn 40000 option dontlognull option tcp-smart-accept option tcp-smart-connect option redispatch retries 3 timeout queue 3500ms timeout connect 3500ms timeout client 120s timeout server 120s
  • 8. Copyright Severalnines AB SQL Load Balancing for MySQL (cont.) !listen (frontend + backend) 8 listen s9s1_33306_defaul_LB mode tcp
 bind *:33306 timeout client 60000ms timeout server 60000ms balance leastconn option httpchk #option allbackups default-server port 9200 inter 2s downinter 5s rise 3 fall 2 slowstart 60s maxconn 256 maxqueue 128 weight 100 server db1 10.0.3.70:3306 check server db2 10.0.3.60:3306 check server db3 10.0.3.50:3306 check
  • 9. Copyright Severalnines AB SQL Load Balancing for MySQL (cont.) !listen (stats ui) 9 userlist STATSUSERS group admin users admin user admin insecure-password admin ! listen admin_page 0.0.0.0:9600 mode http stats enable stats refresh 60s stats uri / acl AuthOkay_ReadOnly http_auth(STATSUSERS) acl AuthOkay_Admin http_auth_group(STATSUSERS) admin stats http-request auth realm admin_page unless AuthOkay_ReadOnly
  • 10. Copyright Severalnines AB 10 !Session rate ! number of new connections per second !Sessions ! current number of sessions/connections !LastChk ! health check !Wght ! server weight
  • 11. Copyright Severalnines AB MySQL Health Checks 11 !Built-in MySQL health check ! option mysql-check user <username> ! Sends two MySQL packages ! Authentication and Quit ! No errors unless MySQL server is down !Complete HTTP Request ! option httpchk ! Response: HTTP/1.1 200 OK ! Check Host and/or MySQL server state ! Galera Node State MySQL [WSREP] Galera Replication (Synchronous) LB MySQL [WSREP] MySQL [WSREP] R/W R/W R/W Client Client Client
  • 12. Copyright Severalnines AB MySQL Health Checks (cont.) 12 !Galera Node ! Check 1: Get node state ! SYNCED or DONOR ! Check 2: If Node is a “DONOR” ! Get the SST method ! xtrabackup ! Return “200 OK” ! rsync or mysqldump ! Return “503 Service Unavailable” Galera Node State
  • 13. Copyright Severalnines AB MySQL Health Checks (cont.) 13 !xinetd service ! mysqlchk.sh (shell script) ! spams syslog by default ! log_on_success = #/etc/xinetd.d/mysqlchk # default: on # description: mysqlchk service mysqlchk { flags = REUSE socket_type = stream port = 9200 wait = no user = nobody server = /usr/local/bin/mysqlchk.sh log_on_failure += USERID disable = no #only_from = 0.0.0.0/0 per_source = UNLIMITED }
  • 14. Copyright Severalnines AB Network Tuning !TCP tuning 14 #/etc/sysctl.conf net.ipv4.ip_nonlocal_bind=1 net.ipv4.tcp_tw_reuse=1 # reuse TIME-WAIT sockets net.ipv4.ip_local_port_range=1024 65023 # increase max num of ports net.ipv4.tcp_max_syn_backlog=40000 #Increase the number of outstanding syn requests net.ipv4.tcp_max_tw_buckets=400000 # Maximal number of timewait sockets net.ipv4.tcp_max_orphans=60000 net.ipv4.tcp_max_syn_backlog=40000 # TCP SYN Flood Protection net.ipv4.tcp_synack_retries=3 # TCP SYN Flood Protection net.core.somaxconn=40000 # burst connection rate net.ipv4.tcp_fin_timeout=5 # how long to keep sockets in FIN-WAIT-2
  • 15. Copyright Severalnines AB Fault Tolerance for HAProxy 15 Client HAProxy 1 MySQL
 MySQL
 MySQL
 IP: 10.10.10.20
  • 16. Copyright Severalnines AB Fault Tolerance for HAProxy (cont.) !Active/Passive IP failover ! keepalived ! VRRP protocol provides router/IP failover !VIP, “floating IP”: 10.10.10.10 ! net.ipv4.ip_nonlocal_bind=1 !Master - HAProxy 1 ! IP: 10.10.10.20 !Backup - HAProxy 2 ! IP: 10.10.10.30 16
  • 17. Copyright Severalnines AB Fault Tolerance for HAProxy (cont.) !keepalived configuration file 17 #/etc/keepalived/keepalived.conf vrrp_script chk_haproxy { script "killall -0 haproxy" # verify the pid existence interval 2 # check every 2 seconds weight 2 # adjust priority by this weight } vrrp_instance VI_1 { interface eth0 state MASTER virtual_router_id 51 # ID for this route priority 101 # 101 on master
 # 100 on backup virtual_ipaddress { 10.10.10.10 # the virtual IP } track_script { chk_haproxy } }
  • 18. Copyright Severalnines AB ClusterControl HAProxy + Keepalived !Install HAProxy with our admin scripts ! http://www.severalnines.com/blog/using-haproxy-database-clusters 18 $ git clone https://github.com/severalnines/s9s-admin.git $ cd s9s-admin/cluster/ # install haproxy1 on 10.10.10.20 listening on 33306 $ ./s9s_haproxy --install -i 1 -n <ip db1>,<ip db2>,<ip db3> -h10.10.10.20 # install haproxy2 on 10.10.10.30 listening on 33306 $ ./s9s_haproxy --install -i 1 -n <ip db1>,<ip db2>,<ip db3> -h10.10.10.30 # scale out db nodes on haproxy1 $ ./s9s_haproxy --add-node -i 1 -h 10.10.10.20 -n <ip db4> $ ./s9s_haproxy --add-node -i 1 -h 10.10.10.20 -n <ip db5> # scale out db nodes on haproxy2 $ ./s9s_haproxy --add-node -i 1 -h 10.10.10.30 -n <ip db4> $ ./s9s_haproxy --add-node -i 1 -h 10.10.10.30 -n <ip db5>
  • 19. Copyright Severalnines AB ClusterControl HAProxy + Keepalived (cont.) !Deployment and configuration automated from ClusterControl 19
  • 20. Copyright Severalnines AB ClusterControl HAProxy + Keepalived (cont.) 20
  • 21. Copyright Severalnines AB Deployment Scenarios 21 !MySQL Cluster / NDB Engine ! Active/Active, Shared nothing architecture ! SQL, Data and MGMT Nodes ! HAProxy co-located with MGMT Nodes ! MGMT is a light weight process ! Re-use “idle” servers ! Connections originate from HAProxy server ! Additional latency ! App Server <-> HAProxy <-> SQL Node <-> Data Node NDB Data Node NDB Data Node (MGMT) HAProxy (MGMT) HAProxy SQL Node
 MySQL Server SQL Node
 MySQL Server
  • 22. Copyright Severalnines AB Deployment Scenarios (cont.) 22 NDB Data Node NDB Data Node !MySQL Cluster / NDB Engine ! Active/Active, Shared nothing architecture ! SQL, Data and MGMT Nodes ! HAProxy co-located with App servers ! No extra latency ! Extra load on app servers ! Health check loads on SQL nodes from all LBs ! Alt: MySQL Connector/J’s JDBC driver ! jdbc:mysql:loadbalance://host-1,host-2,…host-n/database? loadBalanceBlacklistTimeout=5000 ! Config changes propagate to all app servers (App) HAProxy (App) HAProxy SQL Node
 MySQL Server SQL Node
 MySQL Server
  • 23. Copyright Severalnines AB Deployment Scenarios (cont.) 23 NDB Data Node NDB Data Node !MySQL Cluster / NDB Engine ! Active/Active, Shared nothing architecture ! SQL, Data and MGMT Nodes ! HAProxy co-located with SQL nodes ! No extra latency ! Extra load on SQL nodes ! Do not use JDBC load balancing ! VIP (App) (App) SQL Node
 MySQL Server SQL Node
 MySQL Server HAProxy HAProxy …
  • 24. Copyright Severalnines AB Deployment Scenarios (cont.) 24 MySQL Slave MySQL Master !MySQL Replication Master/Slave ! 1 Master for Writes ! N Slaves for Reads ! Separate front and backends configs for Master and Slaves !ex: backend configuration for Slaves HAProxy MySQL Slave MySQL Slave Writes Reads frontend front_reads mode tcp bind 192.168.100.110:3316 default_backend cluster_reads 
 backend cluster_reads mode tcp balance roundrobin server Slave1 10.10.10.30:3306 check server Slave2 10.10.10.40:3306 check
  • 25. Copyright Severalnines AB Deployment Scenarios (cont.) 25 !Galera Cluster ! Synchronous Replication, Read & Write to any Node ! Cluster wide optimistic locking ! Higher probability for “deadlocks” ! Pessimistic locking on the Node MySQL [WSREP] Galera Replication (Synchronous) LB MySQL [WSREP] MySQL [WSREP] R/W R/W R/W Client Client Client
  • 26. Copyright Severalnines AB Deployment Scenarios (cont.) 26 !Galera Cluster ! Synchronous Replication, Read & Write to all Nodes ! Cluster wide optimistic locking ! Higher probability for “deadlocks” ! Pessimistic locking on the Node MySQL [WSREP] Galera Replication (Synchronous) LB MySQL [WSREP] MySQL [WSREP] R/W R/W R/W Client Client Client
  • 27. Copyright Severalnines AB Deployment Scenarios (cont.) 27 MySQL [WSREP] Galera Replication (Synchronous) LB MySQL [WSREP] MySQL [WSREP] R/W R/W R/W Client Client Client listen s9s1_33307_LB1 bind *:33307 mode tcp timeout client 60000ms timeout server 60000ms balance leastconn option httpchk default-server port 9200 inter 2s <…> server db1 10.0.3.70:3306 check server db2 10.0.3.60:3306 check backup server db3 10.0.3.50:3306 check backup !Handle “dead locks” ! Write to only one Node - Use HAProxy ! Expect deadlocks and make sure applications handles it properly. Retry the transaction. ! wsrep_retry_autocommit=1 ! Changes to the App code to minimise data hotspots.
  • 28. Copyright Severalnines AB Alternatives !MySQL’s Connector/J JDBC driver !jdbc:mysql:loadbalance://host-1,host-2,… !PHP mysqlnd ! http://www.php.net/manual/en/intro.mysqlnd-ms.php !Oracle’s MySQL Proxy 0.84 ! http://dev.mysql.com/downloads/mysql-proxy/ !SkySQL’s MaxScale 1.0.0. beta ! https://github.com/skysql/MaxScale !ProxySQL ! https://github.com/renecannao/proxysql !Pen 0.24.0 ! http://morestuff.siag.nu/category/pen/ 28
  • 29. Copyright Severalnines AB Thank You! !Tutorial – MySQL Load Balancing with HAProxy ! http://www.severalnines.com/resources/clustercontrol-mysql-haproxy-load- balancing-tutorial !Severalnines Blog ! www.severalnines.com/blog !s9s-admin tools ! https://github.com/severalnines/s9s-admin !More Questions? Contact us at: ! info@severalnines.com 29