I'm using akka cluster sharding 2.5.23. For my case i want to know the current live active actors count.I have read many articles saying use Lightbend telemetry which is paid.And Cinnamonor or kamon which i don't need that much of metrics.I only need to know current active actors. Any way to achieve this easy?
Related
I am working in a distributed environment where I have to setup Actors in remote systems. I want to distribute the load among all the remote actors. Can anyone suggest me the best way to balance load in a cluster? My current scenario is in one remote system I have 10 actors which are running. so for example, let's say I have 3 system and systems have 10 actors and I want to balance the load among all the 30 actors.
A good way to distribute work is by pulling it from the worker instead of centralising the decision and pushing, which can potentially overload the worker nodes if you have a higher rate of work coming in than you can actually process.
There is a sample project and tutorial showing worker actors pulling work here: https://developer.lightbend.com/guides/akka-distributed-workers-scala/
I'm trying to gather a bit of knowledge on using an Akka Cluster application for an ETL style application.
I've read through most of the documentation and I'm now looking on moving forward with writing the actual application so I'm here to see if anyone has worked on something before and has any recommendations.
The ETL will need to able to schedule and throttle HTTP requests to a variety of endpoints. I would like to find a way to publish the statistics of the application (response times from endpoints, overall time in the application, and collect errors).
The application should be autoscaled so that when the amount of scheduled requests is increasing over time the Akka Cluster will add nodes to respond to the influx of work.
I was thinking that each scheduled request would produce a UUID to track the work (identifying results and errors that happen). So after the external endpoints respond or don't the results could be placed on a Akka Stream that would post process the requests as part of the T and the L of the application.
If there are good patterns out there or anyone can make a recommendation I would greatly appreciate it.
Cheers!
Take a look at kamon.io -- it's a library to provide metrics and tracing through a variety of technologies, and has an Akka tracing component. From the little I've worked with it, starting a trace requires just one method call.
My application has a set of Actors, each one doing some heavy computation, and each one executing a different business logic. At the end each actor sends the result back to the Supervisor that in turn persist the data.
My intention is to have them distribute in 3 nodes to split/balance the workload, as well as make the system high available, by allowing on of the machines "die".
There is no need to share state among the machines
How does Akka solve for this scenario?
Is it an Akka cluster that I need?
Are there any examples that fall in this domain?
To share state between instance you can use Sharding and PersistentActor.
You can play Reactive Missile Defend project to visualise what happened if node goes down.
There are nice talks on JDD2015 Sharding with Akka. From theory to production and Scala eXchange - Beat Aliens with Akka Cluster showing how to use distributed Actors (with Cluster and Sharding) and how they behave in situation of turning off one of the nodes.
Using the event bus mechanism between actors in the same ActorSystem is straight-forward, but I was wondering if there was a sanctioned method for doing so between:
Actors in different ActorSystems in the same JVM
Actors in different JVMs (via remoting)
Assuming that I know the paths to the actors is fine, but if there was a commonly used mechanism to discover those kinds of things as well, I'd love to hear about it.
I think in this case you need to look for distributed publish-subscribe on a cluster, supposing you want to subscribe actors to events, without awareness of the location of the actors. This link may prove useful.
This is a note from the official Akka documentation:
The event stream is a local facility, meaning that it will not
distribute events to other nodes in a clustered environment (unless
you subscribe a Remote Actor to the stream explicitly). If you need to
broadcast events in an Akka cluster, without knowing your recipients
explicitly (i.e. obtaining their ActorRefs), you may want to look
into: Distributed Publish Subscribe in Cluster.
I'm new to Scala Actors. What I plan to build is an application that has several cartridges that each do a specific http call and retrieve+persist some info periodically. Robustness is what matters the most. So far these are the ways I've thought of:
Build the app around a TimerTask,
extend cartridges from Actor and
call their .act s periodically (or
should I send them messages instead?
what's the difference?)
Extend from Actor and use Timeouts
to periodically run them.
Can someone shed some light on the differences?
Scala Actors will be merged with Akka so take a look at http://akka.io,
You can use Akka's "Scheduler" to schedule messages to be sent to actors at certain intervals, it's all in the docs:
http://akka.io/docs/akka/1.1.3/
Hope this helps,
Cheers,
√