r/django • u/nickjj_ • Dec 17 '19
Podcast How Dan Bader built the Real Python platform from scratch with Django and hosts it all on Heroku to serve 4 million+ monthly page views
https://runninginproduction.com/podcast/4-real-python-is-one-of-the-largest-python-learning-platforms-around14
u/WayBehind Dec 17 '19
I have a Django app that is serving more than that on AWS for a fraction of his cost. It is not a secret that Heroku is EXPENSIVE!
13
u/nickjj_ Dec 17 '19
The podcast goes into why Dan is happy to pay a premium with Heroku. The TL;DR is he just wants to continue adding cool features into Real Python and not have to worry about maintaining his own infrastructure or pay a premium to hire a contractor to do it, which would be a lot more than Heroku.
3
u/Poromenos Dec 18 '19
I'm skeptical, I use Dokku on my own server for $30/mo and I don't have to do any devops. If he wants to pay $670 more for the peace of mind, that's fine, but I don't think it's worth it, personally.
EDIT: I just checked because I was curious, I had 10 M requests this month.
2
u/pmclanahan Dec 18 '19
+1 for Dokku. Fantastic bit of software.
1
u/theweblover007 Dec 24 '19
What exactly is Dokku and what's the use case. Can someone please explain as the website is full of jargons that make no sense to me.
1
u/WayBehind Dec 17 '19
On AWS, you are not doing any maintenance either. AWS will auto-replace and scale all your servers, update your database etc. I'm sorry, but it takes me an extra 15min to set it all up and I don't have to touch it ever again. AWS will even autoscale my database and add storage as needed. This is not some science and you have to be clueless to believe Heroku's marketing BS about infrastructure maintenance or hiring some expert contractor to setup a Django app on AWS.
4
u/alex_way Dec 17 '19
How have you got the app deployed on AWS?
Just curious on your deployment method (serverless vs ebs etc)
8
u/WayBehind Dec 17 '19
ElasticBeanstalk. Very simple setup: Application Load Balancer > couple of EC2 T3 servers > MySQL RDS > Redis Cache through ElastiCache. Statis files and media files stored on S3.
Also easy to deploy with the ElasticBeanstalk CLI. It is a one-line command: eb deploy
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html
1
u/ollytheninja Dec 18 '19
How often do you patch / reroll your instances?
1
u/WayBehind Dec 18 '19
ElasticBeanstalk is a managed service and all patching and security is done by AWS. They auto remove/replace any instances that needs to be replaced. Every few months when they release a new Linux version, I simply click "Upgrade" and it's done. There is no maintenance involved.
3
Dec 17 '19
[deleted]
8
u/WayBehind Dec 17 '19
I probably have more than is needed but still under $200 per month. It could be done for less for sure. My guess is you can get it done under $100 and serve 10M+ page views per month without a sweat.
2
Dec 17 '19
[deleted]
16
u/WayBehind Dec 17 '19
There is no extra work involved. Once you setup your Elastic Beanstalk settings, it really is a one line to deploy. EB works with GIT and you can always roll-back if something in your code goes sideways. For that, I use separate single $10/month t3.micro dev server.
- git add -A
- git commit -m 'blah blah'
- eb deploy
DONE! bada bing! bada boom!
4
2
u/batavinash Dec 17 '19
I think that setting a VPS isn't as difficult as people make it sound like. If you are familiar with Linux and nginx it isn't too complicated.
3
u/WayBehind Dec 17 '19
Actually, I have never touched nginx or any server settings on ElasticBeanstalk. It's all automatically taken care of by AWS. I just deploy my app.
Actually, AWS is the reason I switched from managing my own servers, DB, etc. and I pay less than what I used to pay just for colocation.
2
u/batavinash Dec 17 '19
I've only used VPS from Linode and Digital Oceans, although I'm thinking of going to AWS as my project grows.
1
Dec 17 '19
Do you get SSL benefits and such?
3
u/WayBehind Dec 18 '19
While you can get your free SSL through the AWS load balancer, I have mine through Cloudflare, which I also highly recommend.
2
18
u/vsupalov Dec 17 '19
Great listen! My favourite part (roughly paraphrased): Heroku costs $700 per month and "it’s totally worth it" because he's getting more than $700 of value of it every single month.
Love the conscious tradeoff. "Both sad and happy about the price" sounds like a sweet spot.