from Hacker News

Ask HN: In-memory Webserver

by twopoint718 on 8/12/09, 9:24 PM with 5 comments

I've been thinking about my needs for a webserver and seeing as how I'm only going to be serving static pages I want to concentrate on speed and simplicity. In my scenario I'll have a set of pages that aren't going to change, and if they do, taking down the server would be okay. My question is then:

Is there a webserver that, when started, reads all pages into memory and then never touches the disk again? Would a similar effect be better achieved with something like Apache + memcached? Other suggestions?

  • by cperciva on 8/12/09, 9:41 PM

    Other suggestions?

    You're thinking way too hard. As long as you have enough RAM, your operating system will cache data; so you don't need to do anything fancy at all. Set up whatever web server you like, in the default configuration, and measure its performance; odds are that you'll find that you don't need to tune anything at all.

  • by jacquesm on 8/12/09, 9:25 PM

    I'm using apache+varnishd, I've heard good stuff about http://nginx.net/

    Good luck!

  • by sambeau on 8/13/09, 7:11 AM

    you could serve from a ram disk
  • by yrashk on 8/12/09, 9:28 PM

    nginx+memcached or nginx+ramfs?