<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cluster on Manuel Bernhardt</title><link>https://manuel.bernhardt.io/tags/cluster/</link><description>Recent content in Cluster on Manuel Bernhardt</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 18 Feb 2023 20:54:16 +0100</lastBuildDate><atom:link href="https://manuel.bernhardt.io/tags/cluster/index.xml" rel="self" type="application/rss+xml"/><item><title>10000 nodes and beyond with Akka Cluster and Rapid</title><link>https://manuel.bernhardt.io/2020/04/30/10000-node-cluster-with-akka-and-rapid/</link><pubDate>Thu, 30 Apr 2020 09:39:47 +0200</pubDate><guid>https://manuel.bernhardt.io/2020/04/30/10000-node-cluster-with-akka-and-rapid/</guid><description>&lt;p>Update: there&amp;rsquo;s a &lt;a href="https://soundcloud.com/lightbend/scaling-akka-cluster-to-10000-nodes-with-rapid-manuel-bernhardt" target="_blank" rel="noreferrer noopener">podcast episode&lt;/a> about this&lt;/p>
&lt;p>&lt;span class="firstcharacter">T&lt;/span>he year is 2021. As the world is still deeply affected by the COVID-19 pandemic, the United Nations have decided that in order to prevent the same scenario of ever happening again, there should be a worldwide, real-time contact-tracing system in place capable of tracking every human being on the planet. Everyone is now equipped with a small, pebble-like device. If a person you have been in contact with is confirmed to carry a new kind of virus for which there is no remedy, the device starts glowing in red. Each device reports the anonymized contact information to one global backend system capable of handling this type of massive scale.&lt;/p></description></item><item><title>Tour of Akka Typed: Cluster Singleton and Routers</title><link>https://manuel.bernhardt.io/2019/12/03/tour-of-akka-typed-cluster-singleton-and-routers/</link><pubDate>Tue, 03 Dec 2019 14:59:48 +0100</pubDate><guid>https://manuel.bernhardt.io/2019/12/03/tour-of-akka-typed-cluster-singleton-and-routers/</guid><description>&lt;p>In &lt;a href="https://manuel.bernhardt.io/2019/11/09/tour-of-akka-typed-cluster-sharding/">part 5 of this series&lt;/a>, we started to scale the application from a local one to a clustered one by introducing Cluster Sharding. In this article, we will continue our effort to scale the payment processor out and make it resilient through the use of Cluster Singletons and Cluster-Aware Routers.&lt;/p>
&lt;p>Before we get started, here’s a quick reminder of what we’ve seen so far: in the &lt;a href="https://manuel.bernhardt.io/2019/07/11/tour-of-akka-typed-protocols-and-behaviors/">first part&lt;/a> we had a look at the the raison d’être of Akka Typed and what advantages it has over the classic, untyped API. In the &lt;a href="https://manuel.bernhardt.io/2019/08/07/tour-of-akka-typed-message-adapters-ask-pattern-and-actor-discovery/">second part&lt;/a> we introduced the concepts of message adapters, the ask pattern and actor discovery. In the third part, we covered one of the core concepts of Actor systems: &lt;a href="https://manuel.bernhardt.io/2016/08/09/akka-anti-patterns-flat-actor-hierarchies-or-mixing-business-logic-and-failure-handling/">supervision and failure recovery&lt;/a>. In the fourth part, we covered one of the most popular use-cases for Akka: &lt;a href="https://manuel.bernhardt.io/2019/10/07/tour-of-akka-typed-event-sourcing/">event sourcing&lt;/a>. Finally, as mentioned before, in the &lt;a href="https://manuel.bernhardt.io/2019/11/09/tour-of-akka-typed-cluster-sharding/">fifth part&lt;/a> we started scaling out by making use of cluster sharding.&lt;/p></description></item><item><title>One step closer: exploiting locality in Akka Cluster based systems</title><link>https://manuel.bernhardt.io/2019/10/28/one-step-closer-exploiting-locality-in-akka-cluster-based-systems/</link><pubDate>Mon, 28 Oct 2019 12:36:24 +0100</pubDate><guid>https://manuel.bernhardt.io/2019/10/28/one-step-closer-exploiting-locality-in-akka-cluster-based-systems/</guid><description>&lt;p>When it comes to the latency of processing a request in a distributed system, everyone knows (or &lt;a rel="noreferrer noopener" aria-label="should know (opens in a new tab)" href="https://gist.github.com/jboner/2841832" target="_blank">should know&lt;/a>) that doing things over the network is the most expensive thing you can do (alongside with disk reads):&lt;/p>
&lt;p>
 &lt;figure style="text-align: center">
 &lt;img src="https://manuel.bernhardt.io/wp-content/687474703a2f2f692e696d6775722e636f6d2f6b307431652e706e67.png" class="pure-img" alt="">
 &lt;figcaption>The round trip time in a datacenter is about 5000 times longer than a main memory reference&lt;/figcaption>
 &lt;/figure>

&lt;/p>
&lt;p>Modern architectures have recognized this and will favor keeping data in memory, avoiding the need to go to disk or to the database, when consistency requirements allow for it. With &lt;a href="https://manuel.bernhardt.io/2018/02/26/tour-akka-cluster-cluster-sharding/">Akka Cluster Sharding&lt;/a> combined with &lt;a href="https://manuel.bernhardt.io/2018/01/31/tour-akka-cluster-eventual-consistency-persistent-actors-message-delivery-semantics/">Akka Persistence&lt;/a>, it is possible to keep millions of durable entities in memory, reducing latency to a large degree.&lt;/p></description></item><item><title>Raspberry PI Akka Cluster LED strips</title><link>https://manuel.bernhardt.io/2019/05/02/raspberry-pi-akka-cluster-led-strips/</link><pubDate>Thu, 02 May 2019 12:00:59 +0200</pubDate><guid>https://manuel.bernhardt.io/2019/05/02/raspberry-pi-akka-cluster-led-strips/</guid><description>&lt;p>Ever since Eric Loots from Lightbend first showed me the Raspberry-PI based Akka Cluster with special LED stripes, I&amp;rsquo;ve wanted (at least) one of them.&lt;/p>
&lt;p>
 &lt;figure style="text-align: center">
 &lt;img src="https://manuel.bernhardt.io/wp-content/DdY1IWfWsAAMmEN.jpeg" class="pure-img" alt="">
 &lt;figcaption>The Akka PI Cluster at Scala Days 2018&lt;/figcaption>
 &lt;/figure>

&lt;/p>
&lt;p>This is a 5 node cluster with special LED stripes setup in such a way that the LED colour and status (on, off, blinking, etc.) show in which state each node is. It is an excellent way to teach Akka Cluster, and since &lt;a href="https://manuel.bernhardt.io/training">I do this regularly&lt;/a> I was very interested from the beginning to get one of these myself.&lt;/p></description></item><item><title>Tour of Akka Cluster</title><link>https://manuel.bernhardt.io/2018/08/03/tour-akka-cluster/</link><pubDate>Fri, 03 Aug 2018 09:25:34 +0200</pubDate><guid>https://manuel.bernhardt.io/2018/08/03/tour-akka-cluster/</guid><description>&lt;p>Here&amp;rsquo;s an overview of the Tour of Akka Cluster article series:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://manuel.bernhardt.io/2018/01/03/tour-akka-cluster-akka-distributed-data/">Tour of Akka Cluster - Akka Distributed Data&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://manuel.bernhardt.io/2018/01/31/tour-akka-cluster-eventual-consistency-persistent-actors-message-delivery-semantics/">Tour of Akka Cluster - Eventual consistency, persistent actors, message delivery semantics&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://manuel.bernhardt.io/2018/02/26/tour-akka-cluster-cluster-sharding/">Tour of Akka Cluster - Cluster Sharding&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://manuel.bernhardt.io/2018/03/23/tour-akka-cluster-testing-multi-node-testkit-handful-raspberry-pis/">Tour of Akka Cluster - Testing with the multi-node-testkit and a handful Raspberry PIs&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Tour of Akka Cluster – Testing with the multi-node-testkit and a handful Raspberry PIs</title><link>https://manuel.bernhardt.io/2018/03/23/tour-akka-cluster-testing-multi-node-testkit-handful-raspberry-pis/</link><pubDate>Fri, 23 Mar 2018 08:19:47 +0100</pubDate><guid>https://manuel.bernhardt.io/2018/03/23/tour-akka-cluster-testing-multi-node-testkit-handful-raspberry-pis/</guid><description>&lt;p>In the previous parts of this article series, we have looked at various functionality of Akka Cluster: &lt;a href="https://manuel.bernhardt.io/2018/01/03/tour-akka-cluster-akka-distributed-data/">distributed data&lt;/a>, &lt;a href="https://manuel.bernhardt.io/2018/01/31/tour-akka-cluster-eventual-consistency-persistent-actors-message-delivery-semantics/">persistence, message delivery semantics&lt;/a> and &lt;a href="https://manuel.bernhardt.io/2018/02/26/tour-akka-cluster-cluster-sharding/">cluster sharding&lt;/a>. We are far from done with exploring Akka Cluster features, but today it is time to look at one feature that is extremely useful when it comes to building production-quality systems based on Akka Cluster: the test support. As testing itself isn&amp;rsquo;t the most exciting activity there is, let&amp;rsquo;s space this article a bit up by throwing a few Raspberry PIs in the mix:&lt;/p></description></item><item><title>Tour of Akka Cluster – Cluster Sharding</title><link>https://manuel.bernhardt.io/2018/02/26/tour-akka-cluster-cluster-sharding/</link><pubDate>Mon, 26 Feb 2018 16:33:04 +0100</pubDate><guid>https://manuel.bernhardt.io/2018/02/26/tour-akka-cluster-cluster-sharding/</guid><description>&lt;p>In &lt;a href="https://manuel.bernhardt.io/2018/01/31/tour-akka-cluster-eventual-consistency-persistent-actors-message-delivery-semantics/">Tour of Akka Cluster - Eventual consistency, persistent actors and message delivery semantics&lt;/a> we started to look into making the reactive payment processor resilient to node crashes by exploring Akka Persistence, a mechansim that provides durability guarantees for actor state. We also briefly mentioned &lt;a href="https://doc.akka.io/docs/akka/2.5/cluster-sharding.html">Akka Cluster Sharding&lt;/a> which offers a way to automatically distribute actors of the same type over several nodes. In this article we are going to take a closer look at cluster sharding and then make use of it for our reactive payment processor.&lt;/p></description></item><item><title>Tour of Akka Cluster – Eventual consistency, persistent actors, message delivery semantics</title><link>https://manuel.bernhardt.io/2018/01/31/tour-akka-cluster-eventual-consistency-persistent-actors-message-delivery-semantics/</link><pubDate>Wed, 31 Jan 2018 14:19:43 +0100</pubDate><guid>https://manuel.bernhardt.io/2018/01/31/tour-akka-cluster-eventual-consistency-persistent-actors-message-delivery-semantics/</guid><description>&lt;p>In &lt;a href="https://manuel.bernhardt.io/2018/01/03/tour-akka-cluster-akka-distributed-data/">Tour of Akka Cluster - Akka Distributed Data&lt;/a> we looked into building a reactive payment processing system using Akka Distributed Data as a means to provide master-master replication to the order storage component. We did not, however, ensure in any way of form that the system as a whole could withstand individual node crashes. In this article, we will explore options for making the Reactive Payment Processor fault-tolerant.&lt;/p>
&lt;h2 id="evaluating-the-existing-design-in-the-light-of-redundancy">Evaluating the existing design in the light of redundancy&lt;/h2>
&lt;p>Let&amp;rsquo;s make a thought experiment and see if our current design is fit to be &amp;ldquo;upgraded&amp;rdquo; in the light of redundancy. Let&amp;rsquo;s suppose we have made the validation process redundant, so that it would take place on any node (not just the node on which the order was first registered). This way, should the order receiving the node fail, we would still be able to continue validation and processing (so long as it wasn&amp;rsquo;t the node also handling the particular acquring bank).&lt;/p></description></item><item><title>Tour of Akka Cluster – Akka Distributed Data</title><link>https://manuel.bernhardt.io/2018/01/03/tour-akka-cluster-akka-distributed-data/</link><pubDate>Wed, 03 Jan 2018 15:23:04 +0100</pubDate><guid>https://manuel.bernhardt.io/2018/01/03/tour-akka-cluster-akka-distributed-data/</guid><description>&lt;p>Building distributed systems is hard. Pesky things like the laws of physics get in the way of maintaining state accross geographically (and chronologically) disparate systems, and, if that weren&amp;rsquo;t already outrageous enough in itself, those systems may be subject to network failures, forcing us to think about annoying tradeoffs regarding consistency, availability and the meaning of life.&lt;/p>
&lt;p>One of the more interesting (well, at least from my perspective) tools in the &lt;a href="https://akka.io">Akka&lt;/a> toolbox is &lt;a href="https://doc.akka.io/docs/akka/current/cluster-usage.html?language=scala">Akka Cluster&lt;/a> and the modules built on top of it. Through its design it acknowledges the hard reality of life, promoting a &amp;ldquo;no magic here&amp;rdquo; approach to building distributed applications and yet at the same time, takes care about many of the harder aspects of doing so.&lt;/p></description></item></channel></rss>