SlideShare une entreprise Scribd logo
1  sur  38
Télécharger pour lire hors ligne
Orchestrator
Consul
ProxySQL
with Super Tengen Toppa
MySQL Korea User Group
1
Github’s Orchestartor
MySQL replication topology management and HA
2
YOSHINORI MATSUNOBU’s MHA
3
http://yoshinorimatsunobu.blogspot.com/2011/07/announcing-mysql-mha-mysql-master-high.html
MySQL replication topology management and HA
4
5
GitHub’s Orchestrator
6
https://blog.github.com/2018-10-30-oct21-post-incident-analysis/
code.openark.org
• MySQL master discovery methods, part 1: DNS
• MySQL master discovery methods, part 2: VIP & DNS
• MySQL master discovery methods, part 3: app & service
discovery
• MySQL master discovery methods, part 4: Proxy heuristics
• MySQL master discovery methods, part 5: Service discovery &
Proxy
• MySQL master discovery methods, part 6: other methods
7
Hashicorp’s Consul
service discovery and configuration. Consul is distributed, highly
available, and extremely scalable.
8
service discovery and configuration. Consul is distributed,
highly available, and extremely scalable.
Service Discovery
for connectivity
Service Registry enables services to
register and discover each other.
Service Segmentation
for security
Secure service-to-service communication
with automatic TLS encryption and
identity-based authorization.
Service Configuration
for runtime configuration
Feature rich Key/Value store to easily
configure services.
9
Service Connect, automatic proxy sidecars
10
Sidecar model ( Parasyte )
11
Consul Client Consul Client
Consul Server
Consul Server ➔ Consul Client
12
Server
( Leaer )
Server Server
Client
Client
Client
RPC
Raft
13
consul & consul-template package ?!
$ ll --block-size=M consul consul-template
-rwxr-xr-x 1 dev dev 95M Nov 15 07:42 consul*
-rwxr-xr-x 1 dev dev 8M Jun 13 01:15 consul-template*
14
/etc/consul.d/server.json
{
"node_name“ : "server1“,
"server“ : true,
"bootstrap_expect“ : 1,
"bind_addr“ : "192.168.33.10“,
"client_addr“ : "0.0.0.0“,
"data_dir“ : "/tmp/consul"
}
15
/etc/consul.d/client.json
{
"node_name“ : "client1“,
"server“ : false,
"bind_addr“ : "192.168.33.11“,
"start_join“ : [ “192.168.33.10“ ],
"data_dir“ : "/tmp/consul"
}
16
Consul Server Configuration
옵션 설 명
node_name 노드 이름. 기본값은 호스트 이름입니다. 고유 필요가 있다
server 서버 모드로 부팅할지 여부
bootstrap_expect
Consul 클러스터 를 형성 할 때 지정하는 server 노드 수입니다. 그 숫자에 도달 한 시
점에서 리더의 선출한다. 수에 도달하지 않으면 전혀 리더가 정해지지 않는 상태가 된다.
bind_addr
bind있는 내부 클러스터 의 주소 범위. 기본 0.0.0.0.
vagrant 라면 Failed to get advertise address: Multiple private IPs found. Please c
onfigure one.이 나오면 지정.
client_addr bind있는 클라이언트의 주소 범위. 기본 127.0.0.1
data_dir Consul가 내부적으로 사용하는 디렉토리
17
Consul Client Configuration
18
옵션 설 명
node_name 노드 이름. 기본값은 호스트 이름입니다. 고유 필요가 있다
server 서버 모드로 부팅할지 여부
bind_addr
bind있는 내부 클러스터 의 주소 범위. 기본 0.0.0.0.
vagrant 라면 Failed to get advertise address: Multiple private IPs found. Please c
onfigure one.이 나오면 지정.
start_join join하는 서버 군의 IP
data_dir Consul가 내부적으로 사용하는 디렉토리
Consul Ports
기능 TCP / UDP 포트 설 명
Server RPC TCP 8300 Server가 다른 Agent에서 RPC 요청을 받아들이고
Serf LAN TCP 및 UDP 8301 LAN 용 gossip 프로토콜, 전체 Agent끼리 사용
Serf WAN TCP 및 UDP 8302 WAN 용 gossip 프로토콜, Server끼리 사용
CLI RPC TCP 8400 consul 명령 실행시 로컬 Agent 와의 통신에 사용
HTTP API TCP 8500 Client가 HTTP 요청을 수락
DNS TCP 및 UDP 8600 Agent가 DNS 쿼리를 허용
19
https://www.consul.io/docs/agent/options.html
https://qiita.com/ryo0301/items/a65709c4d99408f1df0a
CLI RPC
$ consul members
Node Address Status Type Build Protocol DC
client1 192.168.33.11:8301 alive client 1.4.0 2 dc1
server1 192.168.33.10:8301 alive server 1.4.0 2 dc1
$ consul members
Node Address Status Type Build Protocol DC
client1 192.168.33.11:8301 left client 1.4.0 2 dc1
server1 192.168.33.10:8301 alive server 1.4.0 2 dc1
20
HTTP API
$ curl localhost:8500/v1/catalog/nodes?pretty
[
{
"Node": "client1",
"Address": "192.168.33.11",
"TaggedAddresses": {
"wan": "192.168.33.11"
},
"CreateIndex": 356,
"ModifyIndex": 357
},
21
{
"Node": "server1",
"Address": "192.168.33.10",
"TaggedAddresses": {
"wan": "192.168.33.10"
},
"CreateIndex": 192,
"ModifyIndex": 355
}
]
DNS
$ dig @localhost -p 8600 server1.node.consul
;; ANSWER SECTION:
server1.node.consul. 0 IN A 192.168.33.10
$ dig @localhost -p 8600 client1.node.consul
;; ANSWER SECTION:
client1.node.consul. 0 IN A 192.168.33.11
22
HashiCorp Tools
These Consul tools are created and managed by the dedicated
engineers at HashiCorp :
• Enconsul - Read and set environmental variables for processes from
Consul.
• Consul Migrate - Data migration tool to handle Consul upgrades to
0.5.1+
• Consul Replicate - Consul cross-DC KV replication daemon.
• Consul Template - Generic template rendering and notifications with
Consul
23
Template rendering, notifier, and supervisor for
Consul and Vault data.
24
proxysql.cfgproxysql.cfg.tpl
2
1
3
Utilities - envconsul
• https://github.com/hashicorp/envconsul
$ consul kv put my-app/address 1.2.3.4
$ consul kv put my-app/port 80
$ consul kv put my-app/max_conns 5
$ envconsul -prefix my-app env
address=1.2.3.4
max_conns=5
port=80
25
ProxySQL
High-performance MySQL proxy with a GPL license.
26
High-performance MySQL Proxy
27
Percona Monitoring and
Management ( PMM )
is open-source platform for managing and monitoring MySQL and
MongoDB performance.
28
MySQL, ProxySQL, Orchestrator Monitoring
29
Prometheus + Grafana + Consul + …
30
OCP Demo
31
WIX
32
Consul Cluster
33
Orchestrator
34
ProxySQL
35
MySQL Cluster
36
Futher…
• Consul Cluster
• Orchestrator Replication
• ProxySQL Replication
• PMM Replication
• Dnsmasq - network services for small networks.
• ACL, SSL/TLS Encryption
• Hashicorp’s Vault
• Consul-template
• Stress Application
• Envoy
37
Q?!A
38

Contenu connexe

Tendances

Tendances (20)

{{more}} Kibana4
{{more}} Kibana4{{more}} Kibana4
{{more}} Kibana4
 
What is the ServiceStack?
What is the ServiceStack?What is the ServiceStack?
What is the ServiceStack?
 
Rack
RackRack
Rack
 
NGINX 101 - now with more Docker
NGINX 101 - now with more DockerNGINX 101 - now with more Docker
NGINX 101 - now with more Docker
 
Securing Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultSecuring Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp Vault
 
under the covers -- chef in 20 minutes or less
under the covers -- chef in 20 minutes or lessunder the covers -- chef in 20 minutes or less
under the covers -- chef in 20 minutes or less
 
Consul: Service-oriented at Scale
Consul: Service-oriented at ScaleConsul: Service-oriented at Scale
Consul: Service-oriented at Scale
 
비동기 회고 발표자료
비동기 회고 발표자료비동기 회고 발표자료
비동기 회고 발표자료
 
Nginx
NginxNginx
Nginx
 
Introduction to Systems Management with SaltStack
Introduction to Systems Management with SaltStackIntroduction to Systems Management with SaltStack
Introduction to Systems Management with SaltStack
 
Designing High Availability for HashiCorp Vault in AWS
Designing High Availability for HashiCorp Vault in AWSDesigning High Availability for HashiCorp Vault in AWS
Designing High Availability for HashiCorp Vault in AWS
 
Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016Mastering Grails 3 Plugins - Greach 2016
Mastering Grails 3 Plugins - Greach 2016
 
Monitoring Docker with ELK
Monitoring Docker with ELKMonitoring Docker with ELK
Monitoring Docker with ELK
 
Plack basics for Perl websites - YAPC::EU 2011
Plack basics for Perl websites - YAPC::EU 2011Plack basics for Perl websites - YAPC::EU 2011
Plack basics for Perl websites - YAPC::EU 2011
 
Tales Of The Black Knight - Keeping EverythingMe running
Tales Of The Black Knight - Keeping EverythingMe runningTales Of The Black Knight - Keeping EverythingMe running
Tales Of The Black Knight - Keeping EverythingMe running
 
Node.js streaming csv downloads proxy
Node.js streaming csv downloads proxyNode.js streaming csv downloads proxy
Node.js streaming csv downloads proxy
 
Raymond Kuiper - Working the API like a Unix Pro
Raymond Kuiper - Working the API like a Unix ProRaymond Kuiper - Working the API like a Unix Pro
Raymond Kuiper - Working the API like a Unix Pro
 
Nomad + Flatcar: a harmonious marriage of lightweights
Nomad + Flatcar: a harmonious marriage of lightweightsNomad + Flatcar: a harmonious marriage of lightweights
Nomad + Flatcar: a harmonious marriage of lightweights
 
Writing a fast HTTP parser
Writing a fast HTTP parserWriting a fast HTTP parser
Writing a fast HTTP parser
 
Icinga 2010 at Nagios Workshop
Icinga 2010 at Nagios WorkshopIcinga 2010 at Nagios Workshop
Icinga 2010 at Nagios Workshop
 

Similaire à OCP with super tengen toppa

OpenStack Paris 2014 - Federation, are we there yet ?
OpenStack Paris 2014 - Federation, are we there yet ?OpenStack Paris 2014 - Federation, are we there yet ?
OpenStack Paris 2014 - Federation, are we there yet ?
Tim Bell
 

Similaire à OCP with super tengen toppa (20)

Service Discovery & Load-Balancing under Docker 1.12.0 @ Docker Meetup #22
Service Discovery & Load-Balancing under Docker 1.12.0 @ Docker Meetup #22Service Discovery & Load-Balancing under Docker 1.12.0 @ Docker Meetup #22
Service Discovery & Load-Balancing under Docker 1.12.0 @ Docker Meetup #22
 
Service Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesService Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and Kubernetes
 
arataga. SObjectizer and RESTinio in action: a real-world example
arataga. SObjectizer and RESTinio in action: a real-world examplearataga. SObjectizer and RESTinio in action: a real-world example
arataga. SObjectizer and RESTinio in action: a real-world example
 
Consul: Service Mesh for Microservices
Consul: Service Mesh for MicroservicesConsul: Service Mesh for Microservices
Consul: Service Mesh for Microservices
 
Soa with consul
Soa with consulSoa with consul
Soa with consul
 
Serverless Design Patterns
Serverless Design PatternsServerless Design Patterns
Serverless Design Patterns
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
 
Serveless design patterns
Serveless design patternsServeless design patterns
Serveless design patterns
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack API
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA ToolMySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA Tool
 
Docker Service Registration and Discovery
Docker Service Registration and DiscoveryDocker Service Registration and Discovery
Docker Service Registration and Discovery
 
HiveServer2
HiveServer2HiveServer2
HiveServer2
 
Reference architectures shows a microservices deployed to Kubernetes
Reference architectures shows a microservices deployed to KubernetesReference architectures shows a microservices deployed to Kubernetes
Reference architectures shows a microservices deployed to Kubernetes
 
Deep Dive OpenShitt on Azure & .NET Core on OpenShift
Deep Dive OpenShitt on Azure & .NET Core on OpenShiftDeep Dive OpenShitt on Azure & .NET Core on OpenShift
Deep Dive OpenShitt on Azure & .NET Core on OpenShift
 
Grokking TechTalk 9 - Building a realtime & offline editing service from scra...
Grokking TechTalk 9 - Building a realtime & offline editing service from scra...Grokking TechTalk 9 - Building a realtime & offline editing service from scra...
Grokking TechTalk 9 - Building a realtime & offline editing service from scra...
 
What’s new in WSO2 Enterprise Integrator 6.6
What’s new in WSO2 Enterprise Integrator 6.6What’s new in WSO2 Enterprise Integrator 6.6
What’s new in WSO2 Enterprise Integrator 6.6
 
Grokking #9: Building a real-time and offline editing service with Couchbase
Grokking #9: Building a real-time and offline editing service with CouchbaseGrokking #9: Building a real-time and offline editing service with Couchbase
Grokking #9: Building a real-time and offline editing service with Couchbase
 
HashiStack. To the cloud and beyond...
HashiStack. To the cloud and beyond...HashiStack. To the cloud and beyond...
HashiStack. To the cloud and beyond...
 
OpenStack Paris 2014 - Federation, are we there yet ?
OpenStack Paris 2014 - Federation, are we there yet ?OpenStack Paris 2014 - Federation, are we there yet ?
OpenStack Paris 2014 - Federation, are we there yet ?
 

Plus de hyeongchae lee

patroni-based citrus high availability environment deployment
patroni-based citrus high availability environment deploymentpatroni-based citrus high availability environment deployment
patroni-based citrus high availability environment deployment
hyeongchae lee
 
Securing Databases with Dynamic Credentials and HashiCorp’s Vault
Securing Databases with Dynamic Credentials and HashiCorp’s VaultSecuring Databases with Dynamic Credentials and HashiCorp’s Vault
Securing Databases with Dynamic Credentials and HashiCorp’s Vault
hyeongchae lee
 
in-memory database system and low latency
in-memory database system and low latencyin-memory database system and low latency
in-memory database system and low latency
hyeongchae lee
 

Plus de hyeongchae lee (12)

patroni-based citrus high availability environment deployment
patroni-based citrus high availability environment deploymentpatroni-based citrus high availability environment deployment
patroni-based citrus high availability environment deployment
 
[PGDay.Seoul 2020] PostgreSQL 13 New Features
[PGDay.Seoul 2020] PostgreSQL 13 New Features[PGDay.Seoul 2020] PostgreSQL 13 New Features
[PGDay.Seoul 2020] PostgreSQL 13 New Features
 
[HashiTalk Korea] OCP with Super Tengen Toppa
[HashiTalk Korea] OCP with Super Tengen Toppa[HashiTalk Korea] OCP with Super Tengen Toppa
[HashiTalk Korea] OCP with Super Tengen Toppa
 
Securing Databases with Dynamic Credentials and HashiCorp’s Vault
Securing Databases with Dynamic Credentials and HashiCorp’s VaultSecuring Databases with Dynamic Credentials and HashiCorp’s Vault
Securing Databases with Dynamic Credentials and HashiCorp’s Vault
 
PostgreSQL 정기 기술 세미나 22회
PostgreSQL 정기 기술 세미나 22회PostgreSQL 정기 기술 세미나 22회
PostgreSQL 정기 기술 세미나 22회
 
PGDay.Seoul 2016 lightingtalk
PGDay.Seoul 2016 lightingtalkPGDay.Seoul 2016 lightingtalk
PGDay.Seoul 2016 lightingtalk
 
20141206 4 q14_dataconference_i_am_your_db
20141206 4 q14_dataconference_i_am_your_db20141206 4 q14_dataconference_i_am_your_db
20141206 4 q14_dataconference_i_am_your_db
 
osscon_mysql_redis_plugin
osscon_mysql_redis_pluginosscon_mysql_redis_plugin
osscon_mysql_redis_plugin
 
Oracle2DBMS Notes and Comments
Oracle2DBMS Notes and CommentsOracle2DBMS Notes and Comments
Oracle2DBMS Notes and Comments
 
NewSQL
NewSQLNewSQL
NewSQL
 
eXtremeDB FE
eXtremeDB FEeXtremeDB FE
eXtremeDB FE
 
in-memory database system and low latency
in-memory database system and low latencyin-memory database system and low latency
in-memory database system and low latency
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Dernier (20)

8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 

OCP with super tengen toppa

  • 1. Orchestrator Consul ProxySQL with Super Tengen Toppa MySQL Korea User Group 1
  • 2. Github’s Orchestartor MySQL replication topology management and HA 2
  • 4. MySQL replication topology management and HA 4
  • 5. 5
  • 7. code.openark.org • MySQL master discovery methods, part 1: DNS • MySQL master discovery methods, part 2: VIP & DNS • MySQL master discovery methods, part 3: app & service discovery • MySQL master discovery methods, part 4: Proxy heuristics • MySQL master discovery methods, part 5: Service discovery & Proxy • MySQL master discovery methods, part 6: other methods 7
  • 8. Hashicorp’s Consul service discovery and configuration. Consul is distributed, highly available, and extremely scalable. 8
  • 9. service discovery and configuration. Consul is distributed, highly available, and extremely scalable. Service Discovery for connectivity Service Registry enables services to register and discover each other. Service Segmentation for security Secure service-to-service communication with automatic TLS encryption and identity-based authorization. Service Configuration for runtime configuration Feature rich Key/Value store to easily configure services. 9
  • 10. Service Connect, automatic proxy sidecars 10
  • 11. Sidecar model ( Parasyte ) 11 Consul Client Consul Client Consul Server
  • 12. Consul Server ➔ Consul Client 12 Server ( Leaer ) Server Server Client Client Client RPC Raft
  • 13. 13
  • 14. consul & consul-template package ?! $ ll --block-size=M consul consul-template -rwxr-xr-x 1 dev dev 95M Nov 15 07:42 consul* -rwxr-xr-x 1 dev dev 8M Jun 13 01:15 consul-template* 14
  • 15. /etc/consul.d/server.json { "node_name“ : "server1“, "server“ : true, "bootstrap_expect“ : 1, "bind_addr“ : "192.168.33.10“, "client_addr“ : "0.0.0.0“, "data_dir“ : "/tmp/consul" } 15
  • 16. /etc/consul.d/client.json { "node_name“ : "client1“, "server“ : false, "bind_addr“ : "192.168.33.11“, "start_join“ : [ “192.168.33.10“ ], "data_dir“ : "/tmp/consul" } 16
  • 17. Consul Server Configuration 옵션 설 명 node_name 노드 이름. 기본값은 호스트 이름입니다. 고유 필요가 있다 server 서버 모드로 부팅할지 여부 bootstrap_expect Consul 클러스터 를 형성 할 때 지정하는 server 노드 수입니다. 그 숫자에 도달 한 시 점에서 리더의 선출한다. 수에 도달하지 않으면 전혀 리더가 정해지지 않는 상태가 된다. bind_addr bind있는 내부 클러스터 의 주소 범위. 기본 0.0.0.0. vagrant 라면 Failed to get advertise address: Multiple private IPs found. Please c onfigure one.이 나오면 지정. client_addr bind있는 클라이언트의 주소 범위. 기본 127.0.0.1 data_dir Consul가 내부적으로 사용하는 디렉토리 17
  • 18. Consul Client Configuration 18 옵션 설 명 node_name 노드 이름. 기본값은 호스트 이름입니다. 고유 필요가 있다 server 서버 모드로 부팅할지 여부 bind_addr bind있는 내부 클러스터 의 주소 범위. 기본 0.0.0.0. vagrant 라면 Failed to get advertise address: Multiple private IPs found. Please c onfigure one.이 나오면 지정. start_join join하는 서버 군의 IP data_dir Consul가 내부적으로 사용하는 디렉토리
  • 19. Consul Ports 기능 TCP / UDP 포트 설 명 Server RPC TCP 8300 Server가 다른 Agent에서 RPC 요청을 받아들이고 Serf LAN TCP 및 UDP 8301 LAN 용 gossip 프로토콜, 전체 Agent끼리 사용 Serf WAN TCP 및 UDP 8302 WAN 용 gossip 프로토콜, Server끼리 사용 CLI RPC TCP 8400 consul 명령 실행시 로컬 Agent 와의 통신에 사용 HTTP API TCP 8500 Client가 HTTP 요청을 수락 DNS TCP 및 UDP 8600 Agent가 DNS 쿼리를 허용 19 https://www.consul.io/docs/agent/options.html https://qiita.com/ryo0301/items/a65709c4d99408f1df0a
  • 20. CLI RPC $ consul members Node Address Status Type Build Protocol DC client1 192.168.33.11:8301 alive client 1.4.0 2 dc1 server1 192.168.33.10:8301 alive server 1.4.0 2 dc1 $ consul members Node Address Status Type Build Protocol DC client1 192.168.33.11:8301 left client 1.4.0 2 dc1 server1 192.168.33.10:8301 alive server 1.4.0 2 dc1 20
  • 21. HTTP API $ curl localhost:8500/v1/catalog/nodes?pretty [ { "Node": "client1", "Address": "192.168.33.11", "TaggedAddresses": { "wan": "192.168.33.11" }, "CreateIndex": 356, "ModifyIndex": 357 }, 21 { "Node": "server1", "Address": "192.168.33.10", "TaggedAddresses": { "wan": "192.168.33.10" }, "CreateIndex": 192, "ModifyIndex": 355 } ]
  • 22. DNS $ dig @localhost -p 8600 server1.node.consul ;; ANSWER SECTION: server1.node.consul. 0 IN A 192.168.33.10 $ dig @localhost -p 8600 client1.node.consul ;; ANSWER SECTION: client1.node.consul. 0 IN A 192.168.33.11 22
  • 23. HashiCorp Tools These Consul tools are created and managed by the dedicated engineers at HashiCorp : • Enconsul - Read and set environmental variables for processes from Consul. • Consul Migrate - Data migration tool to handle Consul upgrades to 0.5.1+ • Consul Replicate - Consul cross-DC KV replication daemon. • Consul Template - Generic template rendering and notifications with Consul 23
  • 24. Template rendering, notifier, and supervisor for Consul and Vault data. 24 proxysql.cfgproxysql.cfg.tpl 2 1 3
  • 25. Utilities - envconsul • https://github.com/hashicorp/envconsul $ consul kv put my-app/address 1.2.3.4 $ consul kv put my-app/port 80 $ consul kv put my-app/max_conns 5 $ envconsul -prefix my-app env address=1.2.3.4 max_conns=5 port=80 25
  • 26. ProxySQL High-performance MySQL proxy with a GPL license. 26
  • 28. Percona Monitoring and Management ( PMM ) is open-source platform for managing and monitoring MySQL and MongoDB performance. 28
  • 30. Prometheus + Grafana + Consul + … 30
  • 37. Futher… • Consul Cluster • Orchestrator Replication • ProxySQL Replication • PMM Replication • Dnsmasq - network services for small networks. • ACL, SSL/TLS Encryption • Hashicorp’s Vault • Consul-template • Stress Application • Envoy 37