Post on 02-Jan-2016
description
1
WHO ARE YOU???• Clint Alexander• Lancaster County, PA• Married, 3 Children
2
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
• Internet Technologist• IT Contractor• 10 year Professional• MySQL Power User
Web Administration
Web Application Developer
Network Architect
Brainbench CIPCertified Internet Professional
PHP
Systems Administration
Perl
Interactive Developer
LuaLingo
Expect
Action ScriptVisual Basic
Project Management
3
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
WHY ARE WE HERE?
WHY ARE WE HERE?TO DESIGN FAIL-SAFE SYSTEMS
4
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
WHY ARE WE HERE?TO DESIGN FAIL-SAFE SYSTEMS
5
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
WHAT IS THAT?
WHY ARE WE HERE?TO DESIGN FAIL-SAFE SYSTEMS
6
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
WHAT IS THAT?HIGH AVAILABILITY!
WHY ARE WE HERE?TO DESIGN FAIL-SAFE SYSTEMS
7
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
WHAT IS THAT?HIGH AVAILABILITY!
uhh…
WHY ARE WE HERE?TO DESIGN FAIL-SAFE SYSTEMS
8
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
WHAT IS THAT?HIGH AVAILABILITY!
uhh…Keeping your services available 99.9% OF THE TIME.
WHY ARE WE HERE?TO DESIGN FAIL-SAFE SYSTEMS
9
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
WHAT IS THAT?HIGH AVAILABILITY!
uhh…Keeping your services available 99.9% OF THE TIME.
oh…
10
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
LET’S SET SOME REQUIREMENTS…
11
Maximize Cost-Effectiveness
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
12
Design Simple Management
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
13
Redundancy & Fail-Over
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
14
Maintain Optimal Performance
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
15
Minimize Dependencies
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
16
No Single Point of Failure
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
WHAT’S THE OBJECTIVE?
17
• Maximize Cost-Effectiveness• Design Simple Management• Create Redundancy & Fail-Over• Maintain Optimal Performance• Minimize Dependencies• No Single Point of Failure
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
LET’S TALK SCALING
18
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
19
MYSQL-PROXY: THE PROXY BELT
SCALING UP
Clint Alexander <clint@cdalexaneder.net>
20
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
=
21
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
= More RAM= Fast CPU= Fast SCSI= Fast Bus
22
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
Result?
23
MYSQL-PROXY: THE PROXY BELT
SUPER DUDE!(err… Server)
Clint Alexander <clint@cdalexaneder.net>
24
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
SCALING OUT
25
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
Take 1 fish…
26
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
Add lots more.
27
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
Standard Web
Service Setup
28
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
Where should requests go now?
29
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
SimpleScale-OutSolution
30
MYSQL-PROXY: THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
Requests still fulfilled
(whew!)
31
MYSQL-PROXY: THE PROXY BELT
SINGLE GATEWAY DESIGNS
SPOF DETECTED!Single Point of Failure
Great For
• Development Networks• Low-Visibility Services• Low-Availability Services
Clint Alexander <clint@cdalexaneder.net>
32
MYSQL-PROXY: THE PROXY BELT
DUAL GATEWAY DESIGNS
SOFTWARE REQUIRED!•Heartbeat Service•Switching Mechanism
Great For
• Production Networks• High-Visibility Services• High-Availability Services
Clint Alexander <clint@cdalexaneder.net>
33
MYSQL-PROXY: THE PROXY BELT
THE PROXY BELT
Clint Alexander <clint@cdalexaneder.net>
“Strap-On” MySQL-Proxy
34
MYSQL-PROXY: THE PROXY BELT
AUTONOMOUS DESIGN
Clint Alexander <clint@cdalexaneder.net>
Self-Reliant Systems
35
MYSQL-PROXY: THE PROXY BELT
• Maximize Cost-Effectiveness• Design Simple Management• Redundancy & Fail-Over• Maintain Optimal Performance• Minimize Dependencies• No Single Point of Failure
Clint Alexander <clint@cdalexaneder.net>
REQUIREMENTSREQUIREMENTSREVIEWREVIEW
What’s the objective?
36
MYSQL-PROXY: THE PROXY BELT
COST-EFFECTIVENESS?
• No Additional Hardware• No Additional
Installations• No Additional Software• No Additional Labor
Saving $5K – $10K
Clint Alexander <clint@cdalexaneder.net>
37
MYSQL-PROXY: THE PROXY BELT
Maximum Cost-Effectiveness• Simple Management• Redundancy & Fail-Over• Maintain Optimal Performance• Minimize Dependencies• No Single Point of Failure
Clint Alexander <clint@cdalexaneder.net>
What’s the objective?
38
MYSQL-PROXY: THE PROXY BELT
DESIGN SIMPLE MANAGEMENT?
• Servicing the Clients Relative to the purpose and configuration of
the clients• Servicing MySQL
Multiple GUI Administration Options• Servicing Proxy
Easy & Minimal Configuration
Simple Management, in this case, means management of a service required within the network is minimized by its lack of dependents and complexity of its configuration.
Clint Alexander <clint@cdalexaneder.net>
39
MYSQL-PROXY: THE PROXY BELT
REQUIREMENTS REVIEW
Maximum Cost-EffectivenessSimple Management• Redundancy & Fail-Over• Maintain Optimal Performance• Minimize Dependencies• No Single Point of Failure
Clint Alexander <clint@cdalexaneder.net>
40
MYSQL-PROXY: THE PROXY BELT
REDUNDANCY & FAIL-OVER?
• Failure to Client Server DNS Round-Robin (other?)
Clint Alexander <clint@cdalexaneder.net>
• MySQL Services Managed by Lua & Proxy connection
pooling
• Failure to Proxy Service Crontabs and Notifications!
41
MYSQL-PROXY: THE PROXY BELT
Maximum Cost-EffectivenessSimple ManagementRedundancy & Fail-Over• Maintain Optimal Performance• Minimize Dependencies• No Single Point of Failure
Clint Alexander <clint@cdalexaneder.net>
What’s the objective?
42
MYSQL-PROXY: THE PROXY BELT
MAINTAIN OPTIMAL PERFORMANCE?
• MySQL Proxy is light-weight and transparent
• Lua is a well-known light-weight API
Footprint = 0 (zero)
Clint Alexander <clint@cdalexaneder.net>
43
MYSQL-PROXY: THE PROXY BELT
Maximum Cost-EffectivenessSimple ManagementRedundancy & Fail-OverMaintain Optimal Performance• Minimize Dependencies• No Single Point of Failure
Clint Alexander <clint@cdalexaneder.net>
What’s the objective?
44
MYSQL-PROXY: THE PROXY BELT
MINIMIZE DEPENDENCIES?
• Users are dependent on available client systems
• Clients are dependent on available Proxy services
• Proxy is dependent on available MySQL servers
No Extra Dependencies RequiredClint Alexander <clint@cdalexaneder.net>
45
MYSQL-PROXY: THE PROXY BELT
Maximum Cost-EffectivenessSimple ManagementRedundancy & Fail-OverMaintain Optimal PerformanceMinimize Dependencies• No Single Point of Failure
Clint Alexander <clint@cdalexaneder.net>
What’s the objective?
46
MYSQL-PROXY: THE PROXY BELT
NO SINGLE POINT OF FAILURE?
• Fail-over Requires: Minimum: 2+ Clients Minimum: 2+ Proxies Minimum: 2+ Databases
Clint Alexander <clint@cdalexaneder.net>
47
MYSQL-PROXY: THE PROXY BELT
Maximum Cost-EffectivenessSimple ManagementRedundancy & Fail-OverMaintain Optimal PerformanceMinimize DependenciesNo Single Point of Failure
Clint Alexander <clint@cdalexaneder.net>
That’s the objective!
48
MYSQL-PROXY: THE PROXY BELT
WAIT!!DIDN’T WE SAY SOMETHING ABOUT
A CRON SCRIPT?
Clint Alexander <clint@cdalexaneder.net>
49
MYSQL-PROXY: THE PROXY BELT
MANAGABLE CONFIGURATION FILEAssumed Location: /etc/mysql-proxy/mysql-proxy.conf
Clint Alexander <clint@cdalexaneder.net>
50
MYSQL-PROXY: THE PROXY BELT
CRON SCRIPT
Assumed Location: /opt/mysql-proxy/sbin/proxychk.cron
Clint Alexander <clint@cdalexaneder.net>
51
MYSQL-PROXY: THE PROXY BELT
STARTUP SCRIPT
Assumed Location: /etc/init.d/mysqlproxy
Clint Alexander <clint@cdalexaneder.net>
52Clint Alexander <clint@cdalexaneder.net>
MYSQL-PROXY: THE PROXY BELT
http://www.cdalexander.net/mysql.php
Want a copy?
All material is or will be posted here.
Feel free to contact me directly:Clint Alexander <clint@cdalexander.net>