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
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.5k
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
非同期・イベント駆動処理の分散トレーシングの繋げ方
ichikawaken
1
250
Databricks Lakebaseを用いたAIエージェント連携
daiki_akimoto_nttd
0
120
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
420
JAWS DAYS 2026でAIの「もやっと」感が解消された話
smt7174
1
120
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
5
1.3k
Bref でサービスを運用している話
sgash708
0
220
AI時代のIssue駆動開発のススメ
moongift
PRO
0
340
昔話で振り返るAWSの歩み ~S3誕生から20年、クラウドはどう進化したのか~
nrinetcom
PRO
0
140
Oracle Cloud Infrastructure:2026年3月度サービス・アップデート
oracle4engineer
PRO
0
320
ハーネスエンジニアリング×AI適応開発
aictokamiya
3
1.3k
Sansanの認証基盤を支えるアーキテクチャとその振り返り
sansantech
PRO
1
150
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
310
Featured
See All Featured
Navigating Team Friction
lara
192
16k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
780
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
The Limits of Empathy - UXLibs8
cassininazir
1
280
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
420
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
220
HDC tutorial
michielstock
1
600
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
110
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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/