Loadbalancing for MicroProfile RestClient?

54 views
Skip to first unread message

GenXLogics

unread,
Jun 23, 2021, 1:35:53 PM6/23/21
to microp...@googlegroups.com
Hello Experts,
I have been meaning to ask if there is any thought around providing ClientSide load balancing through MP RestClient,

--
Regards,
Deepak

Transire suum pectus mundoque potiri

Andy McCright

unread,
Jun 24, 2021, 1:28:37 PM6/24/21
to MicroProfile
Hi Deepak,

There's nothing currently in the spec around load balancing. You can get a little creating if you mix MP Fault Tolerance with MP Rest Client so that you can fail over to a different endpoint if the primary is down.

I know of some users who achieve load balancing by using an IP sprayer / proxy server - that might be an option for you.  Also, some of the MP Rest Client implementations may have their own proprietary load balancing mechanisms.  For example, Apache CXF has some failover/distribution features documented here: https://cxf.apache.org/docs/jax-rs-failover.html#JAX-RSFailover-LoadDistribution 

Hope this helps,

Andy

Ondro Mihályi

unread,
Jun 24, 2021, 6:19:09 PM6/24/21
to MicroProfile
A trivial load-balancing with MP REST Client can be achieved by implementing a Configsource, that provides different values for the URL config property. The target URL of any REST client can be configured via an MP Config property and if the value of the property changes, the target of the REST client also changes.

Ondro

Dátum: štvrtok 24. júna 2021, čas: 19:28:37 UTC+2, odosielateľ: Andy McCright
Reply all
Reply to author
Forward
0 new messages