Balancing the server load
This is perfect use case for group_by, which basically does all the work for you in a single line:

We also get the added benefit of having the user ids as arrays instead of strings.  This makes more sense, and if for some reason you do want to get the string representation back, you can simply call join(' ') on the array of user ids.

Finally, if you add more servers to your cluster, you just need to edit the single line defining the server names at the top of the file, and everything will still work.

users = (1..255) #&lt;= Amount of users
servers = %w(calculon darth invader_zim)
server_capacity = 100

assigned_users = users.group_by.with_index do |u, i| 
  all_servers_full = (i &gt;= servers.size * server_capacity)
  all_servers_full ? 'failsafe' : servers[i % servers.size]
end

assigned_users.each do |server, users|
  puts "#{server} server has #{users.size} users"
end