Amazon Interview Question
Software Engineer / DevelopersWell I think he is looking for Map Reducer logic.
It has two phase.
map Phase:
Say if you have n computer then use (n-1) to serve pages each capable of storing say 1 million results.
reducer Phase:
It maintains a list of all the request from all the n-1 server but there is not need to join the result.
When ever a request is place just forward it to the appropriate server. :)
1) Partition of database
- jzhu May 18, 2012a) Different tables to different servers
b) Divide large table into multiple partitions to different servers
2) Partition of queries accordingly
3) Develop query cache system to avoid frequent query of database with identical conditions.