consul/website/build/intro/use-cases.html

12 lines
6.0 KiB
HTML

<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta name=viewport content="width=device-width, initial-scale=1.0"> <meta name=description content=""> <meta name=author content=""> <title>Use Cases - Serf</title> <link href="/stylesheets/bootstrap.min-82fe1490.css" media=screen rel=stylesheet /><link href="/stylesheets/main-e5014f86.css" media=screen rel=stylesheet /> <!--[if lt IE 9]><script src="/javascripts/html5shiv-310dd184.js"></script> <script src="/javascripts/respond.min-88c91176.js"></script><![endif]--> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-45101516-1', 'serfdom.io');
ga('send', 'pageview');
</script> </head> <body class="page-Use Cases"> <div id=header> <div class=container> <a class="navbar-brand logo" href="/"> <span></span> </a> <a class="navbar-brand text rls-l" href="/">SERF</a> <ul class="buttons nav navbar-nav navbar-right rls-sb"> <li class=first><a href="/downloads.html">Download</a></li> <li><a href="https://github.com/hashicorp/serf">Github</a></li> </ul> <ul class="main-links nav navbar-nav navbar-right rls-sb"> <li><a href="/intro/index.html">Intro</a></li> <li><a href="/docs/index.html">Docs</a></li> <li><a href="/community.html">Community</a></li> </ul> </div> </div> <div class=container> <div class=col-md-4> <div class="docs-sidebar hidden-print affix-top" role=complementary> <ul class="nav docs-sidenav"> <li> <a href="/intro/index.html">What is Serf?</a> </li> <li class=active> <a href="/intro/use-cases.html">Use Cases</a> </li> <li> <a href="/intro/vs-other-sw.html">Serf vs. Other Software</a> <ul class=nav> <li> <a href="/intro/vs-zookeeper.html">ZooKeeper, doozerd, etcd</a> </li> <li> <a href="/intro/vs-chef-puppet.html">Chef, Puppet, etc.</a> </li> <li> <a href="/intro/vs-fabric.html">Fabric</a> </li> <li> <a href="/intro/vs-custom.html">Custom Solutions</a> </li> </ul> </li> <li> <a href="/intro/getting-started/install.html">Getting Started</a> <ul class=nav> <li> <a href="/intro/getting-started/install.html">Install Serf</a> </li> <li> <a href="/intro/getting-started/agent.html">Run the Agent</a> </li> <li> <a href="/intro/getting-started/join.html">Join a Cluster</a> </li> <li> <a href="/intro/getting-started/event-handlers.html">Event Handlers</a> </li> <li> <a href="/intro/getting-started/user-events.html">Custom User Events</a> </li> <li> <a href="/intro/getting-started/next-steps.html">Next Steps</a> </li> </ul> </li> </ul> </div> </div> <div class=col-md-8 role=main> <div class=bs-docs-section> <h1 id=toc_0>Use Cases</h1> <p>At this point you should know <a href="/intro/">what Serf is</a> and the high-level features Serf provides. This page lists a handful of concrete use cases of Serf. Note that this list is not exhaustive by any means. Serf is a general purpose tool and has infinitely many more use cases. But this list should give you a good idea of how Serf might be useful to you.</p> <p>It is important to remember that all the use cases available below require <em>no centralized state</em>, are masterless, and are completely fault tolerant.</p> <h4 id=toc_1>Web Servers and Load Balancers</h4> <p>Using Serf, it is trivial to create a Serf cluster consisting of web servers and load balancers. The load balancers can listen for membership changes and when a web server comes online or goes offline, they can update their node list.</p> <h4 id=toc_2>Clustering Memcached or Redis</h4> <p>Servers such as Memcached or Redis can be easily clustered by creating a Serf cluster for these nodes. When membership changes, you can update something like <a href="https://github.com/twitter/twemproxy">twemproxy</a> or your own application&#39;s list of available servers.</p> <h4 id=toc_3>Triggering Deploys</h4> <p>Serf can send custom events to a Serf cluster. If you cluster your web applications into a single cluster, you can use Serf&#39;s event system to trigger things such as deploys. Just call <code>serf event deploy</code> and have event handlers installed on all the nodes and the entire cluster will receive this message within seconds and begin deploying.</p> <h4 id=toc_4>Updating DNS Records</h4> <p>Keeping your internal DNS servers updated can be a finicky process. By using Serf, the DNS server can know within seconds when nodes join, leave, or fail, and can update records appropriately. No more stale DNS records, or waiting for a Chef or Puppet run to clear out the records within X minutes. With Serf, the records can be updated nearly instantly.</p> <h4 id=toc_5>A Building Block for Service Discovery</h4> <p>One of the most difficult parts of service discovery is simply knowing what nodes are online, at what addresses, and for what purpose. An effective service discovery layer can easily be built on top of Serf&#39;s seamless membership system. Serf handles all the problems of keeping an up-to-date node list along with some information about those nodes. The service discovery layer then only needs to answer basic questions above that.</p> </div> </div> </div> <div id=footer> <div class=container> <div class=footer-links> <ul class="main-links nav navbar-nav rls-sb"> <li><a href="/intro/index.html">Intro</a></li> <li class=active><a href="/docs/index.html">Docs</a></li> <li><a href="/community.html">Community</a></li> </ul> <ul class="buttons nav navbar-nav rls-sb"> <li class=first><a href="/downloads.html">Download</a></li> <li><a href="https://github.com/hashicorp/serf">Github</a></li> </ul> </div> <div class=footer-logo> <span></span> </div> <div class="footer-hashi os"> <span>© 2013. A <a href="//www.hashicorp.com">HashiCorp</a> Project.</span> <a href="//www.hashicorp.com"><img src="/images/hashi-logo-s-3644fe63.png"></a> </div> </div> </div> <script src="javascripts/lib/d3.v3.min.js"></script> <script src="javascripts/app/deploy/site.js"></script> <script>
Serf.initialize();
</script> </body> </html>