Hacker News new | past | comments | ask | show | jobs | submit login

Precisely my first thought. Static readonly data? Why isn't this just sitting in memory?



Don't filesystem caches basically do this for you?


Yes but with a heck of a lot more overhead than;

  response.body = result[(int)hexCode];


No, with a lot less overhead because you don't need to write custom web server code.

Edit: and if he points the requests directly at blob storage as he's suggesting, we're very close to to flat files on a filesystem again.


You can do that after mmap(2) and you never have to reach out for read(2). Might need to use unsafe language constructs though.


Sounds reasonable, 500mil * 160 bits of SHA-1 would be 500 mb of space. Even with some metadata to manage it, the smallest instances should be able to handle that.


500,000,000*160bits/(8bits/byte)=10,000,000,000 bytes=9,536MB=9.313GB




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: