I have a multiplayer game with a gateway and multiple servers based on node.js and websockets.
Now it of course has a client which all consists of static files (html, js, resources).
Currently I am serving them with node (express framework)
BUT
Is node the best solution for serving static files or should I switch to apache.
I don’t have very much experience with high traffic. Maybe I should consider services like amazon s3 ?
plus here is a simplified version of how I serve files with express.js:
app.get('/*', function(req, res) {
res.sendfile(__dirname + '/client/' + req.params[0]);
});
A Content Delivery Network would definitely be a valid approach. If you want to go with this approach, you’d be looking for something like Amazon Cloudfront – you probably wouldn’t need the features of Amazon S3. There’s a list of different Content Delivery Networks in the wikipedia article I linked at the beginning.