As the question in the title says. Should ray-casting for guns be handled on the server? If so, wouldn't it lag the server, especially when multiple players are shooting their guns?
And if we were to handle it on the client, how would we detect and validate that the client has got a hit?
This is a hard question. IO games follow this issue. Usually an IO game would let the client calculate it, and make changes, but send data to the server. The server would then validate that information, and send it to the client to compare it with what change it made.
In short, the server validates the information, clients are free to make a bullet appear etc, but the client will make changes if needed based on the reply from the server.