c-w / python-loadtests

Performance benchmarks and setup-complexity comparison for Sanic, Flask, Connexion and Django

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python loadtests

This repository contains sample apps and server setup scripts for a variety of Python web stacks:

  • Sanic with Authbind
  • Flask (behind gUnicorn and Nginx)
  • Django (behind Apache)
  • Connexion (behind Tornado and Nginx)

There is also a companion talk for this repository that I gave at the Code & Coffee Meetup in Vancouver.

For each of these stacks, we then run a load-test that consists of a network-bound task and a framework-bound task.

Authbind + Sanic is the easiest stack to set up and is competitive performance-wise with more complicated stacks.

Benchmarks of Sanic versus Flask, Connexion and Django

To reproduce these results, first set up a server for each of the web stacks using the setup scripts:

Now on a seperate driver machine, set up the data store for the network-bound task and then run the load test:

About

Performance benchmarks and setup-complexity comparison for Sanic, Flask, Connexion and Django

License:Apache License 2.0


Languages

Language:Python 53.2%Language:Shell 46.8%