Web service for checking out / leasing a token
Posted
by
JP Slavinsky
on Server Fault
See other posts from Server Fault
or by JP Slavinsky
Published on 2013-07-03T16:50:41Z
Indexed on
2013/07/03
17:07 UTC
Read the original article
Hit count: 200
I run a web site on AWS that has a number of web servers (say 4 of them) running behind a load balancer. For this particular web site, I have one license key of New Relic for doing instrumentation. At any one time, I only want one of the 4 web servers to be using the key. If that server goes offline, I want one of the remaining web servers to be able to begin using the license key.
Does anyone know of a service that would let me manage this process? The service would not particularly need to store the key itself but rather just manage the fact that only one web server can lease out the right to use the key at any time. Something where the web servers would have to come back every few minutes and renew their lease, and if they don't it becomes available to someone else.
I just realized I could maybe accomplish a hacked version of this using a file on S3, but that doesn't prevent race conditions / etc and is definitely hackish.
Any thoughts welcome. FWIW, this site is built on Ruby on Rails. Thanks!
JP
© Server Fault or respective owner