3 ms·
User statuses should never touch hard disk? What happens when your server restarts and everything you were storing in memory disappears?
by thomaspaine 17y ago
User statuses should never touch hard disk? What happens when your server restarts and everything you were storing in memory disappears?
- spc476 17y agoThe greylist daemon I wrote (http://www.x-grey.com/ http://www.x-grey.com/) keeps everything in memory, with a checkpoint (everything gets written out to disk) every hour (the main process forks, and it's the child that does the writing). A similar approach might be applicable here. It could very well be a RAM based approach might be viable once memristros (http://en.wikipedia.org/wiki/Memristor#Potential_applications http://en.wikipedia.org/wiki/Memristor#Potential_application...) are used for memory.
- radu_floricica 17y agoExactly how often do servers restart? Your average commodity server - maybe twice a year. For user data it's too much, but for user statuses, I don't think so. And if you save the data in a controlled restart and only consider crashes, with a bit of effort you can probably go down to about once every couple of years or less. As for the benefit... there was a picture some time back here on HN: http://imgur.com/X1Hi1.gif http://imgur.com/X1Hi1.gif
- cd34 17y agoBased on another article on highscalability, Twitter has one master MySQL server that is used for backups only. If a node crashes, it reloads that status from MySQL. That MySQL server handles 300 tweets per second @ roughly 2400 qps. They now use Scala/JVM rather than rails for the backend, Rails for the frontend. http://highscalability.com/scaling-twitter-making-twitter-10000-percent-faster http://highscalability.com/scaling-twitter-making-twitter-10...