assign/3 is just for an association not for storing. So if you want to make a get probably you should use a GenServer to track the user_id => nickname pairs and monitor socket to remove this pair once socket is disconnected
I think that for the start it should be more than enough. I never did a benchmark for the case like this, not sure that it would resist against 1kk read at the single moment But if you feel that it is a bottleneck then you always have an option to access :ets from another process(your channel) to read and write, then don’t forget to setup :ets with public access.