Hacker News new | ask | show | jobs
Ask HN: If you could, how would you set up Airbnb's servers from scratch
2 points by Delta0 3123 days ago
I'm running an alternative to Airbnb for the tech and crypto community (www.cryptocribs.com). Yesterday, after being live for just two months, my servers already crashed. It turned out that with only about 500 listings, I already ran out of the 20GB storage I used for the setup. I currently run the site on a basic Digital Ocean droplet (1GB/1CPU, 20GB SSD/ 2TB Transfer). Turns out that every listing is already about 50MB and this adds up quickly. To solve the data storage problem, I now resized my droplet a bit and also bought a 100GB attached volume. I am planning to do a NGIX alias redirect for the image files to store any new files in the extra volume. But I feel like there must be a better way to do this
3 comments

I would move to aws, store assets in object storage (s3) instead of block storage (volumes), ensure your application is 12 factor and move it into an asg, move db to rds. Then start the process for moving from ec2 to k8s. That should give you a start.
another question, when do you recommend moving from ec2 to k8s?
thanks for this! why S3 instead of Volumes?
I'm also going to really recommend putting images on Amazon S3 (or Google's equivalent). If you get a good library to handle this, you can also get nicely resized thumbnails as well.

When using volumes, you are are going to constantly have to deal with mapping and rebuilding these as you grow. S3 is just set and forget.

thanks, yes, i need to work on the resizing part as well
I'm not sure what you're doing that's making each and every listing 50MB, that seems like a lot, are they posting lots of high-resolution images or something?
yes, i've limited it to 2MB per pic, but some are putting up 30 to 40 pics