Round robin a list from Phoenix app

You could use the http://erlang.org/doc/man/counters.html counters module to have a counter that each invocation increments. rem(counter_value, number of ips) gets you the IP address to use. That would be probably the fastest way to guarantee true round robin ordering.

2 Likes