Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Centralized Configuration using Consul and Spri...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Eko Kurniawan Khannedy
February 12, 2018
Technology
720
2
Share
Centralized Configuration using Consul and Spring Cloud
Centralized Configuration using Consul and Spring Cloud
Eko Kurniawan Khannedy
February 12, 2018
More Decks by Eko Kurniawan Khannedy
See All by Eko Kurniawan Khannedy
Monolith to Event-Driven Microservices
khannedy
1
270
Refactoring
khannedy
0
360
Multi-Datacenter Kafka at Blibli.com
khannedy
2
1.6k
QA Tools - Research and Development
khannedy
0
300
Reactive Puzzle
khannedy
0
220
Event-Driven Architecture
khannedy
1
2k
Resilience Engineering with Hystrix and Spring
khannedy
1
580
Mocking for Unit Test using Mockito
khannedy
1
350
Validation Best Practice
khannedy
2
1.3k
Other Decks in Technology
See All in Technology
Claude Codeウェビナー資料 - AWSの最新機能をClaude Codeで高速に検証する
oshanqq
0
760
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.6k
生成AI時代に信頼性をどう保ち続けるか - Policy as Code の実践
akitok_
1
400
エムスリーテクノロジーズ株式会社 エンジニア向け紹介資料 / M3 Technologies Company Deck
m3_engineering
0
110
分断された OT と IT を繋ぐ架け橋 -Kubernetes が切り拓く 産業用組み込み製品の現在地 -
yudaiono
1
110
なぜ、私がCommunity Builderに?〜活動期間1か月半でも選出されたワケ〜
yama3133
0
130
AI 時代の Platform Engineering
recruitengineers
PRO
1
200
サンプリングは「作る」のか「使う」のか? 分散トレースのコストと運用を両立する実践的戦略 / Why you need the tail sampling and why you don't want it
ymotongpoo
4
180
AI時代に、 データアナリストがデータエンジニアに異動して
jackojacko_
0
880
AI-Assisted Contributions and Maintainer Load - PyCon US 2026
pauloxnet
1
140
Redmine次期バージョン7.0の注目新機能解説 — UI/UX強化と連携強化を中心に
vividtone
1
120
セキュリティ対策、何からはじめる? CloudNative環境の脅威モデリングと リスク評価実践入門 #cloudnativekaigi
varu3
5
920
Featured
See All Featured
Tell your own story through comics
letsgokoyo
1
920
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
210
Statistics for Hackers
jakevdp
799
230k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
360
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
230
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
120
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
190
Abbi's Birthday
coloredviolet
2
7.6k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
340
Believing is Seeing
oripsolob
1
120
Game over? The fight for quality and originality in the time of robots
wayneb77
1
170
Transcript
CENTRALIZED CONFIGURATION USING CONSUL AND SPRING CLOUD
CENTRALIZED CONFIGURATION EKO KURNIAWAN KHANNEDY ▸ Principal R&D Engineer at
Blibli.com ▸ Part of R&D Team at Blibli.com ▸
[email protected]
CENTRALIZED CONFIGURATION AGENDA ▸ Consul ▸ Spring Cloud ▸ Demo
CONSUL CENTRALIZED CONFIGURATION
None
CENTRALIZED CONFIGURATION WHAT IS CONSUL? ▸ Service Discovery (via DNS
or HTTP) ▸ Failure Detection (health checking) ▸ Key-Value Storage (for dynamic configuration) ▸ Multi Datacenter
CENTRALIZED CONFIGURATION CONSUL CLUSTER ARCHITECTURE ▸ Datacenter ▸ Agent, a
the long running daemon on every member of the Consul cluster ▸ Server, an agent with an expanded set of responsibilities ▸ Client, an agent that forwards all RPCs to a server
CENTRALIZED CONFIGURATION SETUP CONSUL CLUSTER IP Address Role 192.0.0.1 Bootstrap
Consul Server 192.0.0.2 Consul Server 192.0.0.3 Consul Server
CENTRALIZED CONFIGURATION SETUP CONSUL SERVER 1 (BOOTSTRAP) { “bootstrap”: true,
“server”: true, “datacenter”: “blibli", “data_dir”: “/opt/var/consul”, “log_level”: “INFO”, “bind_addr” : “192.0.0.1”, “client_addr” : “192.0.0.1” }
CENTRALIZED CONFIGURATION SETUP CONSUL SERVER 2 { “bootstrap”: false, “server”:
true, “datacenter”: “blibli", “data_dir”: “/opt/var/consul”, “log_level”: “INFO”, “bind_addr” : “192.0.0.2”, “client_addr” : “192.0.0.2”, “start_join” : [ “192.0.0.1”, “192.0.0.3” ] }
CENTRALIZED CONFIGURATION SETUP CONSUL SERVER 3 { “bootstrap”: false, “server”:
true, “datacenter”: “blibli", “data_dir”: “/opt/var/consul”, “log_level”: “INFO”, “bind_addr” : “192.0.0.3”, “client_addr” : “192.0.0.3”, “start_join” : [ “192.0.0.1”, “192.0.0.2” ] }
CENTRALIZED CONFIGURATION SETUP CONSUL CLIENT { “server”: false, “datacenter”: “blibli",
“data_dir”: “/opt/var/consul”, “log_level”: “INFO”, “bind_addr” : “192.0.1.1”, “client_addr” : “192.0.1.1”, “start_join” : [ “192.0.0.1”, “192.0.0.2”, “192.0.0.3” ] }
CENTRALIZED CONFIGURATION START CONSUL AGENT consul agent -ui -config-dir /opt/consul/config
▸ All consul configuration saved as json file in a directory. ▸ Consul automatically read all json file in config directory.
CENTRALIZED CONFIGURATION
SPRING CLOUD CENTRALIZED CONFIGURATION
CENTRALIZED CONFIGURATION ADD CONSUL DEPENDENCY <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-consul-config</artifactId> </dependency>
CENTRALIZED CONFIGURATION ADD CONSUL CONFIGURATION (BOOTSTRAP.PROPERTIES) spring.application.name=blibli-demo spring.cloud.consul.config.fail-fast=true spring.cloud.consul.host=localhost spring.cloud.consul.port=8500
DEMO
CENTRALIZED CONFIGURATION REFERENCES ▸ https://www.consul.io/ ▸ https://cloud.spring.io/spring-cloud-config/ ▸ https://cloud.spring.io/spring-cloud-consul/ ▸
https://spring.io/guides/gs/centralized-configuration/