I´m building a url shortener web application and I would like to know the best architecture to do it in order to provide a fast and reliable service.
I would like to have two separate servicies in different machines.
- The first machine will have the application itself with a apache, nginx, whatever..
- The second one will contain the database.
- The third one will be the one that will be responsible to handle the short url petitions.
The service is not a url shortener at all. It was just easier to explain it like that.
I just need one machine that receives one http query and inserts a record on a database. And I need this machine to do this simple task in a very efficient way. The system will run on linux (I don´t know the distro yet) and I´m totally open to any language or technology. I was thinking using Yaws, Tornado or Snap for that service, but I don´t know yet and its time to plan the architecture for that part. The database will be built on Hadoop.
For the third machine I just need to accept one kind of http petition (GET www.domain.com/shorturl), but it have to do it really fast and it should be stable enough.