Leader election using etcd



# compile
g++ -std=c++14 -I /usr/local/include /usr/local/lib/libetcd-cpp-api.dylib MyApp.cpp -o MyApp
# run instance 1
./MyApp id1
# in another terminal, run instance 2
./MyApp id2
# in another terminal, run instance 3
./MyApp id3




I write about tech

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to set Desktop Scaling to monitor(s) on macOS High Sierra+

Array Data Structure

Back to blogging, now on Medium.

Lessons I Learned at Shopify

What are Iterables and Iterators in Python

Basic Review of Time Complexity & Big Oh Notation

New Reward Slot 🎰

Regular Expressions

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


I write about tech

More from Medium

Data Compression in Aerospike

Hello name ! RAW

Oracle Rest Data Services and OpenAPI

Big Data Storage Solutions (Data Lakes) for Maximum Flexibility