Leader Election for Replicated Services Using Application Scores

  • Diogo Becker
  • Flavio Junqueira
  • Marco Serafini
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7049)


Replicated services often rely on a leader to order client requests and broadcast state updates. In this work, we present POLE, a leader election algorithm that select leaders using application-specific scores. This flexibility given to the application enables the algorithm to tailor leader election according to metrics that are relevant in practical settings and that have been overlooked by existing approaches. Recovery time and request latency are examples of such metrics. To evaluate POLE, we use ZooKeeper, an open-source replicated service used for coordinating Web-scale applications. Our evaluation over realistic wide-area settings shows that application scores can have a significant impact on performance, and that just optimizing the latency of consensus does not translate into lower latency for clients. An important conclusion from our results is that obtaining a general strategy that satisfies a wide range of requirements is difficult, which implies that configurability is indispensable for practical leader election.


leader election replicated services fault tolerance performance 


  1. 1.
    Aguilera, M., Delporte-Gallet, C., Fauconnier, H., Toueg, S.: Stable Leader Election. In: Welch, J.L. (ed.) DISC 2001. LNCS, vol. 2180, pp. 108–122. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  2. 2.
    Aguilera, M., Delporte-Gallet, C., Fauconnier, H., Toueg, S.: On implementing Omega in systems with weak reliability and synchrony assumptions. Distributed Computing 21, 285–314 (2008)CrossRefGoogle Scholar
  3. 3.
    Bakr, O., Keidar, I.: Evaluating the running time of a communication round over the Internet. In: PODC 2002: Proceedings of the 21st Annual Symposium on Principles of Distributed Computing, pp. 243–252. ACM, New York (2002)CrossRefGoogle Scholar
  4. 4.
    Burrows, M.: The Chubby lock service for loosely-coupled distributed systems. In: Proceedings of the 7th Symposium on Operating Systems Design and Implementation, OSDI 2006, pp. 335–350. USENIX Association, Berkeley (2006)Google Scholar
  5. 5.
    Chandra, T., Toueg, S.: Unreliable Failure Detectors for Reliable Distributed Systems. Journal of the ACM 43(2), 225–267 (1996)CrossRefMATHMathSciNetGoogle Scholar
  6. 6.
    Chandra, T.D., Griesemer, R., Redstone, J.: Paxos made live: an engineering perspective. In: Proceedings of the 26th Annual ACM Symposium on Principles of Distributed Computing, PODC 2007, pp. 398–407. ACM, New York (2007)CrossRefGoogle Scholar
  7. 7.
    Chandra, T.D., Hadzilacos, V., Toueg, S.: The weakest failure detector for solving consensus. Journal of the ACM 43(4), 685–722 (1996)CrossRefMATHMathSciNetGoogle Scholar
  8. 8.
    Chen, W., Toueg, S., Aguilera, M.: On the Quality of Service of Failure Detectors. IEEE Transactions on Computers 51, 561–580 (2002)CrossRefMathSciNetGoogle Scholar
  9. 9.
    Fetzer, C., Cristian, F.: A Highly Available Local Leader Election Service. IEEE Trans. Softw. Eng. 25, 603–618 (1999)CrossRefGoogle Scholar
  10. 10.
    Fetzer, C., Raynal, M., Tronel, F.: An adaptive failure detection protocol. In: Proceedings of the 2001 Pacific Rim International Symposium on Dependable Computing, PRDC 2001, pp. 146–153. IEEE Computer Society, Washington, DC (2001)CrossRefGoogle Scholar
  11. 11.
    Garcia-Molina, H.: Elections in a Distributed Computing System. IEEE Trans. Comput. 31(1), 48–59 (1982)CrossRefGoogle Scholar
  12. 12.
    Hunt, P., Konar, M., Junqueira, F.P., Reed, B.: ZooKeeper: Wait-free coordination for Internet-scale systems. In: Proceedings of the 2010 USENIX Annual Technical Conference, USENIXATC 2010. USENIX Association, Berkeley (2010)Google Scholar
  13. 13.
    Junqueira, F., Reed, B., Serafini, M.: Zab: High-performance broadcast for primary-backup systems. In: Proc. of the IEEE Int’l Conf. on Dependable Systems and Networks, DSN-DCCS (2011)Google Scholar
  14. 14.
    Lamport, L.: Paxos made simple. ACM SIGACT News 32(4), 18–25 (2001)Google Scholar
  15. 15.
    Malkhi, D., Oprea, F., Zhou, L.: Ω Meets Paxos: Leader Election and Stability without Eventual Timely Links. In: Fraigniaud, P. (ed.) DISC 2005. LNCS, vol. 3724, pp. 199–213. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  16. 16.
    Sampaio, L., Brasileiro, F.: Adaptive Indulgent Consensus. In: International Conference on Dependable Systems and Networks, pp. 422–431 (2005)Google Scholar
  17. 17.
    Santos, N., Hutle, M., Schiper, A.: Latency-aware leader election. In: Proceedings of the 2009 ACM Symposium on Applied Computing, SAC 2009, pp. 1056–1061. ACM, New York (2009)Google Scholar
  18. 18.
    Schiper, N., Toueg, S.: A Robust and Lightweight Stable Leader Election Service for Dynamic Systems. Tech. Rep. 2008/01, University of Lugano (March 2008)Google Scholar
  19. 19.
    Singh, S., Kurose, J.: Electing leaders based upon performance: the delay model. In: 11th Int’l Conference on Distributed Computing Systems, pp. 464–471 (1991)Google Scholar
  20. 20.
    Singh, S., Kurose, J.: Electing “Good” Leaders. Journal of Parallel and Distributed Computing 21(2), 184–201 (1994)CrossRefMATHGoogle Scholar

Copyright information

© IFIP International Federation for Information Processing 2011

Authors and Affiliations

  • Diogo Becker
    • 1
  • Flavio Junqueira
    • 2
  • Marco Serafini
    • 2
  1. 1.Computer Science DepartmentTechnische Universität DresdenDresdenGermany
  2. 2.Yahoo! ResearchBarcelonaSpain

Personalised recommendations