Fast hosting for scripts

Started by Rooftop, April 25, 2016, 02:53:09 PM

Previous topic - Next topic

Rooftop

I've got a javascript script that I want to host so that other sites can call it remotely.  There will a few versions of the script, but they are all tiny.

The hosting needs to be really fast and really reliable.  Inbuilt caching of some sort might be nice, but otherwise I don't need anything else: no mail servers, no php, none of that. Just fast, reliable serving of flat files a few hundred million times per month.

I've been looking at github pages and bitbucket's equivalent. Anyone have experience or alternatives to suggest?

ergophobe

>>bitbucket

I have only used their git repo hosting, but for the last several years that has been rock solid. Can't comment on their pages equivalent.

>> Inbuilt caching

You mean caching the file in RAM I assume?

Almost everything I can think of is oriented toward page-level caching (reverse proxies like Varnish, LSCache), query caching (memcached), opcode caching for PHP, etc. All of these are oriented to avoiding server processing time (PHP, MySQL) or taking multiple disk reads required to assemble a page and pre-assembling and storing (Varnish). So none of those are going to help you.

I believe that by default, Linux uses spare memory as a file cache. So in theory, if you have VPS dedicated to serving one file and it has any spare memory at all, it should cache your most frequently requested files.

That said, wouldn't the biggest benefit come from getting the file closer to the end user by putting it on a CDN?

ergophobe


Rooftop

Quote from: ergophobe on April 25, 2016, 04:35:02 PM
>>bitbucket


That said, wouldn't the biggest benefit come from getting the file closer to the end user by putting it on a CDN?


I thought that coupling with at least Cloudflare would be wise.  Good point though that this probably negates worry about this server side.

gm66

In the UK my friends use a very fast, cached, SSD Wordpress platform for scripts, non-standard but works really well :

https://www.34sp.com/wordpress-hosting


Cheers,

Gary.
Civilisation is a race between disaster and education ...

ergophobe

>>negates worry about this server side

It may or may not negate the worry, but it definitely negates the benefit. For a static file that doesn't change, very few requests should hit your server at all.

>>fast, cached, SSD

That would be the simpler, cheaper, easier version. You could get a minimal "drop" at Digital Ocean which are all SSD. Not sure what their response times are. But fast SSD hosting should be easy to find.

Again, if the server has enough memory, the OS should cache the file automatically.