Python for Entrepreneurs Transcripts
Chapter: Build web apps with Pyramid: Part 1
Lecture: Web Framework Performance

Login or purchase this course to watch this video and the rest of the course contents.
0:02 Let's have a quick look at the relative performance of Python among all the technologies that you might use to build web applications.
0:12 But before I show you this graph, I want to emphasize that performance is not the only thing when you are starting a business,
0:18 it's much more important that it's easy to work with that it's quick to get something out the door,
0:22 but it's also nice to know if what you are working with is going to live a while as your business grows that you won't have to replace it right away,
0:29 that it would be able to handle some decent growth before you maybe have to so some sort of optimization or even change frameworks.
0:37 So let's look at Python relative to the other technologies. Here is a graph of numbers taken from the TechEmpower benchmark,
0:44 and this is one of the more well respected benchmarks for web applications and it's absolutely comprehensive,
0:51 there are many frameworks and variations on different servers with different databases and so on. So here you can see we have a couple of technologies,
0:59 the fastest one that I put on the list it's not the fastest, but it's definitely interesting, is Bottle. So Bottle running on Python 2 is quite quick,
1:09 it's doing over 35 thousand requests per minute. Than we have Flask, running on Python 2, remember,
1:14 these are all micro frameworks, they do less so you would expect them to be able to be able to do more of it.
1:20 Then we have Pyramid with Python 3 right there and it's coming in third, that's pretty excellent.
1:24 Let's look at the rest, just down from that we've got Node.js and MySQL and we have Flask and Bottle in Python 3, we have Django,
1:31 we have Ruby on Rails and we have ASP.NET running on Mono. So I think you can see that our choice of Pyramid puts us well
1:39 to the right of this graph, it's certainly not bad, in terms of performance,
1:42 but notice something else, that if we look at this on Python 3 alone, remember, Python 2 is getting phased out in just a couple of years,
1:51 and there will only be Python 3 going forward, if we look at Pyramid 3 on Python 3 and we take away say Bottle and Python 2,
1:59 we only look at it running on Python 3 for example, well then, our choice looks pretty smart on performance.
2:04 So as you can see, Pyramid is a very capable web framework in terms of performance it's been great for all of my businesses,
2:12 I've been able to run my businesses and websites on Pyramid on simple cheap virtual machines as you'll see
2:19 we'll do something similar with Digital Ocean, here in this course. My podcast receives over a million HTTP requests to the Python backend
2:26 which goes all the way to the database, per month, and running that on a 10 dollar Digital Ocean server
2:33 doesn't even break a sweat. Barely registers on the CPU meter.

Talk Python's Mastodon Michael Kennedy's Mastodon