Book Image

Mastering Akka

By : Christian Baxter
Book Image

Mastering Akka

By: Christian Baxter

Overview of this book

For a programmer, writing multi-threaded applications is critical as it is important to break large tasks into smaller ones and run them simultaneously. Akka is a distributed computing toolkit that uses the abstraction of the Actor model, enabling developers to build correct, concurrent, and distributed applications using Java and Scala with ease. The book begins with a quick introduction that simplifies concurrent programming with actors. We then proceed to master all aspects of domain-driven design. We’ll teach you how to scale out with Akka Remoting/Clustering. Finally, we introduce Conductr as a means to deploy to and manage microservices across a cluster.
Table of Contents (17 chapters)
Mastering Akka
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface

Troubleshooting and best practices for Akka Clustering/Akka Remoting


When using Akka's remoting or clustering features, there are a few things you should be aware of to avoid common issues. The following few sections will lay out some best practices and tips to use those two features.

Prefer using IP addresses over host names in config

If you are going to explicitly set up your cluster seed nodes, if not using ConductR, then you should use the IP addresses of your nodes in the config versus their host names. The same goes for looking up or deploying actors to a remote system via remoting. This advice goes double if you are in the cloud. The reason is that a blip or issue with DNS will cause the failure detector to think a node is not available when it clearly is still up and running. If the DNS problem persists, then the node will eventually get quarantined, and you will need to restart it even if the DNS issue clears.

Using IP addresses of your clustering or remoting config, instead of host...