is Akka remoting good for communication to another Akka system ?

67 views
Skip to first unread message

gurpreet....@gmail.com

unread,
Dec 1, 2017, 2:09:57 AM12/1/17
to Akka User List
Guys,

i am confused on akka remoting, need some good suggestions w.r.t Akka Remoting.

I have multiple Akka system services running on different Machines, they are communication each other by using Akka remoting.
But i saw Akka's documentation, they are suggesting go for akka-http for communication. is it any problem with Akka-Remoting ? , if yes then how ?


Thanks,
Gurpreet
  

Seoras Ashby

unread,
Dec 1, 2017, 5:50:26 AM12/1/17
to Akka User List
akka remoting is fabulous for exchanging small messages. By default the maximum-frame-size is 128000 bytes and messages larger than that size are logged and dropped with akka.remote.OversizedPayloadException. You can tune maximum-frame-size but you should keep it small since remoting is used for core akka functionality such as cluster heartbeats. Larger messages will hog the channel and cause problems. 

If you have larger messages you either need to break them down into smaller ones or look for an alternative protocol such as akka http or akka streams.

akka.remote.netty.tcp.maximum-frame-size

If you google for 'akka maximum-frame-size' you'll find more background.

Best wishes,
Seoras

Johan Andrén

unread,
Dec 1, 2017, 6:29:07 AM12/1/17
to Akka User List
Avoid using remoting directly and reach for Akka Cluster instead if you want to build a distributed system. 

For isolated systems/services/microservices that you want connect a separate more explicit protocol (HTTP, gRPC or something along those lines) can be a better idea as it make a more clear cut between services and avoids the quite complicated task of making sure  each service to have a compatible version of Akka, Scala, third party libraries which could potentially force you to always deploy a new version of every service every time you want to upgrade one of them.

--
Johan
Akka Team

gurpreet....@gmail.com

unread,
Dec 1, 2017, 8:47:10 AM12/1/17
to Akka User List
Johan,

That means Akka remoting not useful for developers to build independent component under one platform, so where we can use Akka remoting as you said we should avoid !!.

--
Gurpreet

Johan Andrén

unread,
Dec 1, 2017, 9:01:27 AM12/1/17
to Akka User List
Akka Remoting is nowadays essentially there as an underlying layer for Akka Cluster, so use Akka Cluster instead of using Akka Remoting directly unless you have very specific reasons and a very good understanding of what problems you will have to solve when using remoting directly.

--
Johan
Akka Team

gurpreet....@gmail.com

unread,
Dec 2, 2017, 3:01:58 PM12/2/17
to Akka User List
John,

is Akka Cluster supporting load-balancer like HA-Proxy etc. ?, for example: if One Akka component communicating to Another Akka component through LB(load balancer).

--
Gurpreet 

Patrik Nordwall

unread,
Dec 3, 2017, 3:48:44 AM12/3/17
to akka...@googlegroups.com
There are Cluster aware routers if these components are within the same Akka Cluster.


/Patrik

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages