SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
CloudConf
Turin 16th March 2017
Deploy, scale and coordinate a microservice oriented
application
cloudconf.it
Walter Dal Mut
walter.dalmut @ corley.it
Solution Architect @ Corley
Microservices
They're coming outta the walls
Docker Swarm
Issue a new process (deploy)
$ docker service create 
--name app 
registry.walterdalmut.com/app:v1
$ ./app &
Run different processes (scale)
$ docker service scale app=10 $ ./app &
$ ./app &
$ ./app &
What about the locking system?
In a distributed system: locks (distributed locks) are
the foundations for activity synchronization
What about coordination?
A service have its own con guration at
launch
I am here with this address, port etc...
A service require other service
con gurations
Where the database is, which password i should use, etc...
The service should reports its owns status
I am alive and responsive (for healthcheck)
other services can check the health report for the maintenance mode
or to shortcircuit the service dependency
To expose the coordination problem we create an
application
Read the twitter stream
#cloudconf2017
users that tweet with this handle
create a reserved API service [ JSON over HTTP ]
GET /tweet - list my tweets
POST /tweet - record a new
tweet
The database to store tweets is self-contained in the API service
Now every service is exposed with a unique pair
address:port in the swarm
every box is a container (service)
blinks for activities (publish new tweets)
Multiple services
(1)
(1)
(1..*)
(n)
(1..*)
Stream readerer
Distributed queue
Service Worker (need a distributed lock)
a lock identi es the service deployment
progress
on missing => service deploy
on existing => publish messages
Per user container
A proxy to list users and redirects requests
HTTP framework
> GET /user/walterdalmut HTTP/1.1
> Host: cluster.corsi.walterdalmut.com:30000
> User-Agent: curl/7.47.0
> Accept: */*
< HTTP/1.1 302 Found
< location: http://cluster.corsi.walterdalmut.com:30002/v1/tweet
< vary: origin
< cache-control: no-cache
< content-length: 0
< Date: Sun, 12 Mar 2017 11:26:50 GMT
< Connection: keep-alive
CloudConf2017 Example
Every user have its own network address and
port
Every user expose its own API
How do we connect services together?
DNS as a coordination system
DNS is a good solution to point things in a network
DNS SRV expose a service address con guration
$ dig srv _auth._tcp.walterdalmut.com +short
1 10 8080 1.api.walterdalmut.com
1 10 8080 2.api.walterdalmut.com
And service con gurations?
host: db.mynet.local
port: 3306
username: root
password: root
dbname: example
K / V
Several coordination systems available
Etcd is one of the most interesting coordination system available
Consul integrates di erent things together like: DNS, KV, etc...
many other: zookeeper, etc...
Redis as a coordination service
distribute con gurations at paths
$ cat mydb.conf | redis-cli set /path/to/disk/mydb.conf -
Where is my `ls` command now?
$ redis-cli keys /path/*
1) "/path/to/disk/mydb.conf"
Get my con guration back
$ redis-cli get /path/to/disk/mydb.conf
host: db.mynet.local
port: 3306
username: root
password: root
dbname: example
How to report the application status?
Healthchecks
Con gurations can also expires
Dead man switch
application reports continuously
cat mydb.conf | SETEX /path/to/disk/mydb.conf 30 -
EXPIRE /path/to/disk/mydb.conf 30
... sleep 20
EXPIRE /path/to/disk/mydb.conf 30
...
Services links together
Can i watch for con guration changes?
refresh my services on updates
Redis Keyspace Noti cations
or in your con guration le
CONFIG SET notify-keyspace-events AKE
Listen for my con guration changes
SUBSCRIBE __keyspace@0__:/path/to/disk/mydb.conf
Here the event
$ cat mydb.conf | redis-cli set /path/to/disk/mydb.conf -
1) "message"
2) "__keyspace@0__:/path/to/disk/mydb.conf"
3) "set"
Distributed locks
In a single node for redis
NX - if not exists
PX 30000 - expires in 30000 ms
SET /etc/lock/username/.lock {random_value} NX PX 30000
After 30 seconds the lock expires
SET /etc/lock/walterdalmut/.lock 3891573 NX PX 30000
OK
SET /etc/lock/walterdalmut/.lock 2857152 NX PX 30000
(nil)
How do i release the lock?
DEL /etc/lock/walterdalmut/.lock
How do i extend the lock?
EXPIRE /etc/lock/walterdalmut/.lock 30
How do i watch for lock release?
Lock releases
SUBSCRIBE __keyspace@0__:/etc/lock/walterdalmut/.lock
1) "message"
2) "__keyspace@0__:/etc/lock/walterdalmut/.lock"
3) "del"
1) "message"
2) "__keyspace@0__:/etc/lock/walterdalmut/.lock"
3) "expired"
Thank you for listening

Weitere ähnliche Inhalte

Was ist angesagt?

Couch to OpenStack: Glance - July, 23, 2013
Couch to OpenStack: Glance - July, 23, 2013Couch to OpenStack: Glance - July, 23, 2013
Couch to OpenStack: Glance - July, 23, 2013Trevor Roberts Jr.
 
Seastar at Linux Foundation Collaboration Summit
Seastar at Linux Foundation Collaboration SummitSeastar at Linux Foundation Collaboration Summit
Seastar at Linux Foundation Collaboration SummitDon Marti
 
Lab Manual reModernize - Updating and Consolidating MySQL
Lab Manual reModernize - Updating and Consolidating MySQLLab Manual reModernize - Updating and Consolidating MySQL
Lab Manual reModernize - Updating and Consolidating MySQLAmazon Web Services
 
Docker volume-isolator-in-mesos
Docker volume-isolator-in-mesosDocker volume-isolator-in-mesos
Docker volume-isolator-in-mesosGuangya Liu
 
Cassandra and Docker Lessons Learned
Cassandra and Docker Lessons LearnedCassandra and Docker Lessons Learned
Cassandra and Docker Lessons LearnedDataStax Academy
 
Docker Container Orchestration
Docker Container OrchestrationDocker Container Orchestration
Docker Container OrchestrationFernand Galiana
 
Red hat lvm cheatsheet
Red hat   lvm cheatsheetRed hat   lvm cheatsheet
Red hat lvm cheatsheetPrakash Ghosh
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiMike Goelzer
 
Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013Trevor Roberts Jr.
 
CoreOS Overview and Current Status
CoreOS Overview and Current StatusCoreOS Overview and Current Status
CoreOS Overview and Current StatusSreenivas Makam
 
Scaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and PrestoScaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and PrestoVali-Marius Malinoiu
 
Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3Binary Studio
 
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Binary Studio
 
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...Lakmal Warusawithana
 

Was ist angesagt? (20)

Couch to OpenStack: Glance - July, 23, 2013
Couch to OpenStack: Glance - July, 23, 2013Couch to OpenStack: Glance - July, 23, 2013
Couch to OpenStack: Glance - July, 23, 2013
 
Seastar at Linux Foundation Collaboration Summit
Seastar at Linux Foundation Collaboration SummitSeastar at Linux Foundation Collaboration Summit
Seastar at Linux Foundation Collaboration Summit
 
Lab Manual reModernize - Updating and Consolidating MySQL
Lab Manual reModernize - Updating and Consolidating MySQLLab Manual reModernize - Updating and Consolidating MySQL
Lab Manual reModernize - Updating and Consolidating MySQL
 
Docker volume-isolator-in-mesos
Docker volume-isolator-in-mesosDocker volume-isolator-in-mesos
Docker volume-isolator-in-mesos
 
Cassandra and Docker Lessons Learned
Cassandra and Docker Lessons LearnedCassandra and Docker Lessons Learned
Cassandra and Docker Lessons Learned
 
Docker swarm workshop
Docker swarm workshopDocker swarm workshop
Docker swarm workshop
 
Docker Container Orchestration
Docker Container OrchestrationDocker Container Orchestration
Docker Container Orchestration
 
Red hat lvm cheatsheet
Red hat   lvm cheatsheetRed hat   lvm cheatsheet
Red hat lvm cheatsheet
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
 
Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013
 
CoreOS Overview and Current Status
CoreOS Overview and Current StatusCoreOS Overview and Current Status
CoreOS Overview and Current Status
 
Scaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and PrestoScaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and Presto
 
Cassandra via-docker
Cassandra via-dockerCassandra via-docker
Cassandra via-docker
 
Docker Elastic Beanstalk
Docker Elastic BeanstalkDocker Elastic Beanstalk
Docker Elastic Beanstalk
 
Exploring Docker Security
Exploring Docker SecurityExploring Docker Security
Exploring Docker Security
 
Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3
 
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4
 
Docker and stuff
Docker and stuffDocker and stuff
Docker and stuff
 
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
 
Couch to open_stack_keystone
Couch to open_stack_keystoneCouch to open_stack_keystone
Couch to open_stack_keystone
 

Andere mochten auch

HIPAA Compliance in the AWS Cloud
HIPAA Compliance in the AWS CloudHIPAA Compliance in the AWS Cloud
HIPAA Compliance in the AWS CloudNoah Jaehnert
 
A single language for backend and frontend from AngularJS to cloud with Clau...
A single language for backend and frontend  from AngularJS to cloud with Clau...A single language for backend and frontend  from AngularJS to cloud with Clau...
A single language for backend and frontend from AngularJS to cloud with Clau...Corley S.r.l.
 
The advantage of developing with TypeScript
The advantage of developing with TypeScript The advantage of developing with TypeScript
The advantage of developing with TypeScript Corley S.r.l.
 
AngularJS: Service, factory & provider
AngularJS: Service, factory & providerAngularJS: Service, factory & provider
AngularJS: Service, factory & providerCorley S.r.l.
 
An Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux ContainersAn Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux ContainersKento Aoyama
 
Raspberry Pi - HW/SW Application Development
Raspberry Pi - HW/SW Application DevelopmentRaspberry Pi - HW/SW Application Development
Raspberry Pi - HW/SW Application DevelopmentCorley S.r.l.
 
Toolkit of modern web development (DevFest Košice 7.5.2016)
Toolkit of modern web development (DevFest Košice 7.5.2016)Toolkit of modern web development (DevFest Košice 7.5.2016)
Toolkit of modern web development (DevFest Košice 7.5.2016)jskvara
 
Demystifying datastores
Demystifying datastoresDemystifying datastores
Demystifying datastoresvishnu rao
 
Metrics driven dev ops 2017
Metrics driven dev ops 2017Metrics driven dev ops 2017
Metrics driven dev ops 2017Jerry Tan
 
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...David Currie
 
Introduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsIntroduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsdatamantra
 
Golang 101 (Concurrency vs Parallelism)
Golang 101 (Concurrency vs Parallelism)Golang 101 (Concurrency vs Parallelism)
Golang 101 (Concurrency vs Parallelism)Pramesti Hatta K.
 
Protocol buffers and Microservices
Protocol buffers and MicroservicesProtocol buffers and Microservices
Protocol buffers and MicroservicesVladimir Dejanovic
 
Security Monitoring with eBPF
Security Monitoring with eBPFSecurity Monitoring with eBPF
Security Monitoring with eBPFAlex Maestretti
 
Introduction of Mesosphere DCOS
Introduction of Mesosphere DCOSIntroduction of Mesosphere DCOS
Introduction of Mesosphere DCOSDeughyeon Chang
 
Сергей Радзыняк ".NET Microservices in Real Life"
Сергей Радзыняк ".NET Microservices in Real Life"Сергей Радзыняк ".NET Microservices in Real Life"
Сергей Радзыняк ".NET Microservices in Real Life"Fwdays
 

Andere mochten auch (20)

HIPAA Compliance in the AWS Cloud
HIPAA Compliance in the AWS CloudHIPAA Compliance in the AWS Cloud
HIPAA Compliance in the AWS Cloud
 
A single language for backend and frontend from AngularJS to cloud with Clau...
A single language for backend and frontend  from AngularJS to cloud with Clau...A single language for backend and frontend  from AngularJS to cloud with Clau...
A single language for backend and frontend from AngularJS to cloud with Clau...
 
The advantage of developing with TypeScript
The advantage of developing with TypeScript The advantage of developing with TypeScript
The advantage of developing with TypeScript
 
AngularJS: Service, factory & provider
AngularJS: Service, factory & providerAngularJS: Service, factory & provider
AngularJS: Service, factory & provider
 
An Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux ContainersAn Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux Containers
 
Sensu Monitoring
Sensu MonitoringSensu Monitoring
Sensu Monitoring
 
Micro, Nano, Mono? Microservices verständlich erklärt
Micro, Nano, Mono? Microservices verständlich erklärtMicro, Nano, Mono? Microservices verständlich erklärt
Micro, Nano, Mono? Microservices verständlich erklärt
 
Raspberry Pi - HW/SW Application Development
Raspberry Pi - HW/SW Application DevelopmentRaspberry Pi - HW/SW Application Development
Raspberry Pi - HW/SW Application Development
 
Toolkit of modern web development (DevFest Košice 7.5.2016)
Toolkit of modern web development (DevFest Košice 7.5.2016)Toolkit of modern web development (DevFest Košice 7.5.2016)
Toolkit of modern web development (DevFest Košice 7.5.2016)
 
Demystifying datastores
Demystifying datastoresDemystifying datastores
Demystifying datastores
 
Metrics driven dev ops 2017
Metrics driven dev ops 2017Metrics driven dev ops 2017
Metrics driven dev ops 2017
 
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
 
Introduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsIntroduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actors
 
Redis overview
Redis overviewRedis overview
Redis overview
 
React vs Angular2
React vs Angular2React vs Angular2
React vs Angular2
 
Golang 101 (Concurrency vs Parallelism)
Golang 101 (Concurrency vs Parallelism)Golang 101 (Concurrency vs Parallelism)
Golang 101 (Concurrency vs Parallelism)
 
Protocol buffers and Microservices
Protocol buffers and MicroservicesProtocol buffers and Microservices
Protocol buffers and Microservices
 
Security Monitoring with eBPF
Security Monitoring with eBPFSecurity Monitoring with eBPF
Security Monitoring with eBPF
 
Introduction of Mesosphere DCOS
Introduction of Mesosphere DCOSIntroduction of Mesosphere DCOS
Introduction of Mesosphere DCOS
 
Сергей Радзыняк ".NET Microservices in Real Life"
Сергей Радзыняк ".NET Microservices in Real Life"Сергей Радзыняк ".NET Microservices in Real Life"
Сергей Радзыняк ".NET Microservices in Real Life"
 

Ähnlich wie CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application

Cloud Foundry a Developer's Perspective
Cloud Foundry a Developer's PerspectiveCloud Foundry a Developer's Perspective
Cloud Foundry a Developer's PerspectiveDave McCrory
 
Server interview[1]
Server interview[1]Server interview[1]
Server interview[1]sourav nanda
 
Unleash software architecture leveraging on docker
Unleash software architecture leveraging on dockerUnleash software architecture leveraging on docker
Unleash software architecture leveraging on dockerAdrien Blind
 
January 2017 - Deep dive on AWS Lambda and DevOps
January 2017 - Deep dive on AWS Lambda and DevOpsJanuary 2017 - Deep dive on AWS Lambda and DevOps
January 2017 - Deep dive on AWS Lambda and DevOpsDavid McDaniel
 
Service discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consulService discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consulJos Dirksen
 
Service Discovery in Distributed System with DCOS & Kubernettes. - Sahil Sawhney
Service Discovery in Distributed System with DCOS & Kubernettes. - Sahil SawhneyService Discovery in Distributed System with DCOS & Kubernettes. - Sahil Sawhney
Service Discovery in Distributed System with DCOS & Kubernettes. - Sahil SawhneyKnoldus Inc.
 
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 KubernetesSreenivas Makam
 
Framework Agnostic Discovery
Framework Agnostic DiscoveryFramework Agnostic Discovery
Framework Agnostic DiscoveryKubeAcademy
 
Appswitch: Pune Docker Kubernetes meetup 28 July, 2018
Appswitch: Pune Docker Kubernetes meetup 28 July, 2018Appswitch: Pune Docker Kubernetes meetup 28 July, 2018
Appswitch: Pune Docker Kubernetes meetup 28 July, 2018Ashish Puri
 
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...DevOpsDays Tel Aviv
 
Higher order infrastructure: from Docker basics to cluster management - Nicol...
Higher order infrastructure: from Docker basics to cluster management - Nicol...Higher order infrastructure: from Docker basics to cluster management - Nicol...
Higher order infrastructure: from Docker basics to cluster management - Nicol...Codemotion
 
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGE
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGEPRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGE
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGEEditor IJCTER
 
Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)Jérôme Petazzoni
 
Android chapter16-web-services
Android chapter16-web-servicesAndroid chapter16-web-services
Android chapter16-web-servicesAravindharamanan S
 
Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1KlaraOrban
 
Cloud Foundry Technical Overview
Cloud Foundry Technical OverviewCloud Foundry Technical Overview
Cloud Foundry Technical Overviewcornelia davis
 

Ähnlich wie CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application (20)

Cloud Foundry a Developer's Perspective
Cloud Foundry a Developer's PerspectiveCloud Foundry a Developer's Perspective
Cloud Foundry a Developer's Perspective
 
Windows server Interview question and answers
Windows server Interview question and answersWindows server Interview question and answers
Windows server Interview question and answers
 
Dce rpc
Dce rpcDce rpc
Dce rpc
 
Server interview[1]
Server interview[1]Server interview[1]
Server interview[1]
 
Unleash software architecture leveraging on docker
Unleash software architecture leveraging on dockerUnleash software architecture leveraging on docker
Unleash software architecture leveraging on docker
 
January 2017 - Deep dive on AWS Lambda and DevOps
January 2017 - Deep dive on AWS Lambda and DevOpsJanuary 2017 - Deep dive on AWS Lambda and DevOps
January 2017 - Deep dive on AWS Lambda and DevOps
 
Service discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consulService discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consul
 
Service Discovery in Distributed System with DCOS & Kubernettes. - Sahil Sawhney
Service Discovery in Distributed System with DCOS & Kubernettes. - Sahil SawhneyService Discovery in Distributed System with DCOS & Kubernettes. - Sahil Sawhney
Service Discovery in Distributed System with DCOS & Kubernettes. - Sahil Sawhney
 
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
 
Framework Agnostic Discovery
Framework Agnostic DiscoveryFramework Agnostic Discovery
Framework Agnostic Discovery
 
Beyond static configuration
Beyond static configurationBeyond static configuration
Beyond static configuration
 
Appswitch: Pune Docker Kubernetes meetup 28 July, 2018
Appswitch: Pune Docker Kubernetes meetup 28 July, 2018Appswitch: Pune Docker Kubernetes meetup 28 July, 2018
Appswitch: Pune Docker Kubernetes meetup 28 July, 2018
 
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...
Deploy and Destroy: Testing Environments - Michael Arenzon - DevOpsDays Tel A...
 
Higher order infrastructure: from Docker basics to cluster management - Nicol...
Higher order infrastructure: from Docker basics to cluster management - Nicol...Higher order infrastructure: from Docker basics to cluster management - Nicol...
Higher order infrastructure: from Docker basics to cluster management - Nicol...
 
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGE
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGEPRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGE
PRIVATE CLOUD SERVER IMPLEMENTATIONS FOR DATA STORAGE
 
Chapter 6-Remoting
Chapter 6-RemotingChapter 6-Remoting
Chapter 6-Remoting
 
Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)Microservices. Microservices everywhere! (At OSCON 2015)
Microservices. Microservices everywhere! (At OSCON 2015)
 
Android chapter16-web-services
Android chapter16-web-servicesAndroid chapter16-web-services
Android chapter16-web-services
 
Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1Encode x NEAR: Technical Overview of NEAR 1
Encode x NEAR: Technical Overview of NEAR 1
 
Cloud Foundry Technical Overview
Cloud Foundry Technical OverviewCloud Foundry Technical Overview
Cloud Foundry Technical Overview
 

Mehr von Corley S.r.l.

Aws rekognition - riconoscimento facciale
Aws rekognition  - riconoscimento faccialeAws rekognition  - riconoscimento facciale
Aws rekognition - riconoscimento faccialeCorley S.r.l.
 
AWSome day 2018 - scalability and cost optimization with container services
AWSome day 2018 - scalability and cost optimization with container servicesAWSome day 2018 - scalability and cost optimization with container services
AWSome day 2018 - scalability and cost optimization with container servicesCorley S.r.l.
 
AWSome day 2018 - API serverless with aws
AWSome day 2018  - API serverless with awsAWSome day 2018  - API serverless with aws
AWSome day 2018 - API serverless with awsCorley S.r.l.
 
AWSome day 2018 - database in cloud
AWSome day 2018 -  database in cloudAWSome day 2018 -  database in cloud
AWSome day 2018 - database in cloudCorley S.r.l.
 
Trace your micro-services oriented application with Zipkin and OpenTracing
Trace your micro-services oriented application with Zipkin and OpenTracing Trace your micro-services oriented application with Zipkin and OpenTracing
Trace your micro-services oriented application with Zipkin and OpenTracing Corley S.r.l.
 
Apiconf - The perfect REST solution
Apiconf - The perfect REST solutionApiconf - The perfect REST solution
Apiconf - The perfect REST solutionCorley S.r.l.
 
Apiconf - Doc Driven Development
Apiconf - Doc Driven DevelopmentApiconf - Doc Driven Development
Apiconf - Doc Driven DevelopmentCorley S.r.l.
 
Authentication and authorization in res tful infrastructures
Authentication and authorization in res tful infrastructuresAuthentication and authorization in res tful infrastructures
Authentication and authorization in res tful infrastructuresCorley S.r.l.
 
Flexibility and scalability of costs in serverless infrastructures
Flexibility and scalability of costs in serverless infrastructuresFlexibility and scalability of costs in serverless infrastructures
Flexibility and scalability of costs in serverless infrastructuresCorley S.r.l.
 
Angular coding: from project management to web and mobile deploy
Angular coding: from project management to web and mobile deployAngular coding: from project management to web and mobile deploy
Angular coding: from project management to web and mobile deployCorley S.r.l.
 
Corley cloud angular in cloud
Corley cloud   angular in cloudCorley cloud   angular in cloud
Corley cloud angular in cloudCorley S.r.l.
 
Measure your app internals with InfluxDB and Symfony2
Measure your app internals with InfluxDB and Symfony2Measure your app internals with InfluxDB and Symfony2
Measure your app internals with InfluxDB and Symfony2Corley S.r.l.
 
Read Twitter Stream and Tweet back pictures with Raspberry Pi & AWS Lambda
Read Twitter Stream and Tweet back pictures with Raspberry Pi & AWS LambdaRead Twitter Stream and Tweet back pictures with Raspberry Pi & AWS Lambda
Read Twitter Stream and Tweet back pictures with Raspberry Pi & AWS LambdaCorley S.r.l.
 
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...Corley S.r.l.
 
Middleware PHP - A simple micro-framework
Middleware PHP - A simple micro-frameworkMiddleware PHP - A simple micro-framework
Middleware PHP - A simple micro-frameworkCorley S.r.l.
 
From Chef to Saltstack on Cloud Providers - Incontro DevOps 2015
From Chef to Saltstack on Cloud Providers - Incontro DevOps 2015From Chef to Saltstack on Cloud Providers - Incontro DevOps 2015
From Chef to Saltstack on Cloud Providers - Incontro DevOps 2015Corley S.r.l.
 
Cloud Conf 2015 - Develop and Deploy IOT Applications
Cloud Conf 2015 - Develop and Deploy IOT ApplicationsCloud Conf 2015 - Develop and Deploy IOT Applications
Cloud Conf 2015 - Develop and Deploy IOT ApplicationsCorley S.r.l.
 
An introduction to Hubot - CloudConf 2015 - Turin Italy
An introduction to Hubot - CloudConf 2015 - Turin ItalyAn introduction to Hubot - CloudConf 2015 - Turin Italy
An introduction to Hubot - CloudConf 2015 - Turin ItalyCorley S.r.l.
 
AngularJS advanced project management
AngularJS advanced project managementAngularJS advanced project management
AngularJS advanced project managementCorley S.r.l.
 
Scale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic BeanstalkScale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic BeanstalkCorley S.r.l.
 

Mehr von Corley S.r.l. (20)

Aws rekognition - riconoscimento facciale
Aws rekognition  - riconoscimento faccialeAws rekognition  - riconoscimento facciale
Aws rekognition - riconoscimento facciale
 
AWSome day 2018 - scalability and cost optimization with container services
AWSome day 2018 - scalability and cost optimization with container servicesAWSome day 2018 - scalability and cost optimization with container services
AWSome day 2018 - scalability and cost optimization with container services
 
AWSome day 2018 - API serverless with aws
AWSome day 2018  - API serverless with awsAWSome day 2018  - API serverless with aws
AWSome day 2018 - API serverless with aws
 
AWSome day 2018 - database in cloud
AWSome day 2018 -  database in cloudAWSome day 2018 -  database in cloud
AWSome day 2018 - database in cloud
 
Trace your micro-services oriented application with Zipkin and OpenTracing
Trace your micro-services oriented application with Zipkin and OpenTracing Trace your micro-services oriented application with Zipkin and OpenTracing
Trace your micro-services oriented application with Zipkin and OpenTracing
 
Apiconf - The perfect REST solution
Apiconf - The perfect REST solutionApiconf - The perfect REST solution
Apiconf - The perfect REST solution
 
Apiconf - Doc Driven Development
Apiconf - Doc Driven DevelopmentApiconf - Doc Driven Development
Apiconf - Doc Driven Development
 
Authentication and authorization in res tful infrastructures
Authentication and authorization in res tful infrastructuresAuthentication and authorization in res tful infrastructures
Authentication and authorization in res tful infrastructures
 
Flexibility and scalability of costs in serverless infrastructures
Flexibility and scalability of costs in serverless infrastructuresFlexibility and scalability of costs in serverless infrastructures
Flexibility and scalability of costs in serverless infrastructures
 
Angular coding: from project management to web and mobile deploy
Angular coding: from project management to web and mobile deployAngular coding: from project management to web and mobile deploy
Angular coding: from project management to web and mobile deploy
 
Corley cloud angular in cloud
Corley cloud   angular in cloudCorley cloud   angular in cloud
Corley cloud angular in cloud
 
Measure your app internals with InfluxDB and Symfony2
Measure your app internals with InfluxDB and Symfony2Measure your app internals with InfluxDB and Symfony2
Measure your app internals with InfluxDB and Symfony2
 
Read Twitter Stream and Tweet back pictures with Raspberry Pi & AWS Lambda
Read Twitter Stream and Tweet back pictures with Raspberry Pi & AWS LambdaRead Twitter Stream and Tweet back pictures with Raspberry Pi & AWS Lambda
Read Twitter Stream and Tweet back pictures with Raspberry Pi & AWS Lambda
 
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
Deploy and Scale your PHP App with AWS ElasticBeanstalk and Docker- PHPTour L...
 
Middleware PHP - A simple micro-framework
Middleware PHP - A simple micro-frameworkMiddleware PHP - A simple micro-framework
Middleware PHP - A simple micro-framework
 
From Chef to Saltstack on Cloud Providers - Incontro DevOps 2015
From Chef to Saltstack on Cloud Providers - Incontro DevOps 2015From Chef to Saltstack on Cloud Providers - Incontro DevOps 2015
From Chef to Saltstack on Cloud Providers - Incontro DevOps 2015
 
Cloud Conf 2015 - Develop and Deploy IOT Applications
Cloud Conf 2015 - Develop and Deploy IOT ApplicationsCloud Conf 2015 - Develop and Deploy IOT Applications
Cloud Conf 2015 - Develop and Deploy IOT Applications
 
An introduction to Hubot - CloudConf 2015 - Turin Italy
An introduction to Hubot - CloudConf 2015 - Turin ItalyAn introduction to Hubot - CloudConf 2015 - Turin Italy
An introduction to Hubot - CloudConf 2015 - Turin Italy
 
AngularJS advanced project management
AngularJS advanced project managementAngularJS advanced project management
AngularJS advanced project management
 
Scale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic BeanstalkScale your Magento app with Elastic Beanstalk
Scale your Magento app with Elastic Beanstalk
 

Kürzlich hochgeladen

Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
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 ApplicationsAlberto González Trastoy
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
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...ICS
 
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 ...OnePlan Solutions
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
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.pdfkalichargn70th171
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 

Kürzlich hochgeladen (20)

Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive 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
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.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...
 
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 ...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
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
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 

CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application

  • 1. CloudConf Turin 16th March 2017 Deploy, scale and coordinate a microservice oriented application cloudconf.it
  • 2. Walter Dal Mut walter.dalmut @ corley.it Solution Architect @ Corley
  • 6. Issue a new process (deploy) $ docker service create --name app registry.walterdalmut.com/app:v1 $ ./app &
  • 7. Run different processes (scale) $ docker service scale app=10 $ ./app & $ ./app & $ ./app &
  • 8. What about the locking system? In a distributed system: locks (distributed locks) are the foundations for activity synchronization
  • 10. A service have its own con guration at launch I am here with this address, port etc... A service require other service con gurations Where the database is, which password i should use, etc... The service should reports its owns status I am alive and responsive (for healthcheck) other services can check the health report for the maintenance mode or to shortcircuit the service dependency
  • 11. To expose the coordination problem we create an application
  • 12. Read the twitter stream #cloudconf2017
  • 13. users that tweet with this handle create a reserved API service [ JSON over HTTP ] GET /tweet - list my tweets POST /tweet - record a new tweet The database to store tweets is self-contained in the API service
  • 14. Now every service is exposed with a unique pair address:port in the swarm
  • 15. every box is a container (service) blinks for activities (publish new tweets)
  • 16. Multiple services (1) (1) (1..*) (n) (1..*) Stream readerer Distributed queue Service Worker (need a distributed lock) a lock identi es the service deployment progress on missing => service deploy on existing => publish messages Per user container A proxy to list users and redirects requests
  • 17. HTTP framework > GET /user/walterdalmut HTTP/1.1 > Host: cluster.corsi.walterdalmut.com:30000 > User-Agent: curl/7.47.0 > Accept: */* < HTTP/1.1 302 Found < location: http://cluster.corsi.walterdalmut.com:30002/v1/tweet < vary: origin < cache-control: no-cache < content-length: 0 < Date: Sun, 12 Mar 2017 11:26:50 GMT < Connection: keep-alive
  • 19.
  • 20.
  • 21. Every user have its own network address and port Every user expose its own API How do we connect services together?
  • 22. DNS as a coordination system DNS is a good solution to point things in a network DNS SRV expose a service address con guration $ dig srv _auth._tcp.walterdalmut.com +short 1 10 8080 1.api.walterdalmut.com 1 10 8080 2.api.walterdalmut.com
  • 23. And service con gurations? host: db.mynet.local port: 3306 username: root password: root dbname: example
  • 24. K / V Several coordination systems available Etcd is one of the most interesting coordination system available Consul integrates di erent things together like: DNS, KV, etc... many other: zookeeper, etc...
  • 25. Redis as a coordination service
  • 26. distribute con gurations at paths $ cat mydb.conf | redis-cli set /path/to/disk/mydb.conf -
  • 27. Where is my `ls` command now? $ redis-cli keys /path/* 1) "/path/to/disk/mydb.conf"
  • 28. Get my con guration back $ redis-cli get /path/to/disk/mydb.conf host: db.mynet.local port: 3306 username: root password: root dbname: example
  • 29. How to report the application status? Healthchecks
  • 30. Con gurations can also expires Dead man switch application reports continuously cat mydb.conf | SETEX /path/to/disk/mydb.conf 30 - EXPIRE /path/to/disk/mydb.conf 30 ... sleep 20 EXPIRE /path/to/disk/mydb.conf 30 ...
  • 31. Services links together Can i watch for con guration changes? refresh my services on updates
  • 32. Redis Keyspace Noti cations or in your con guration le CONFIG SET notify-keyspace-events AKE
  • 33. Listen for my con guration changes SUBSCRIBE __keyspace@0__:/path/to/disk/mydb.conf
  • 34. Here the event $ cat mydb.conf | redis-cli set /path/to/disk/mydb.conf - 1) "message" 2) "__keyspace@0__:/path/to/disk/mydb.conf" 3) "set"
  • 35. Distributed locks In a single node for redis NX - if not exists PX 30000 - expires in 30000 ms SET /etc/lock/username/.lock {random_value} NX PX 30000
  • 36. After 30 seconds the lock expires SET /etc/lock/walterdalmut/.lock 3891573 NX PX 30000 OK SET /etc/lock/walterdalmut/.lock 2857152 NX PX 30000 (nil)
  • 37. How do i release the lock? DEL /etc/lock/walterdalmut/.lock
  • 38. How do i extend the lock? EXPIRE /etc/lock/walterdalmut/.lock 30
  • 39. How do i watch for lock release? Lock releases SUBSCRIBE __keyspace@0__:/etc/lock/walterdalmut/.lock 1) "message" 2) "__keyspace@0__:/etc/lock/walterdalmut/.lock" 3) "del" 1) "message" 2) "__keyspace@0__:/etc/lock/walterdalmut/.lock" 3) "expired"
  • 40. Thank you for listening