librelist archives

« back to archive

Growing pains

Growing pains

From:
Matt Shields
Date:
2015-06-08 @ 16:56
I've been noticing an issue as my site continues to grow where there will
be brief periods of the site appearing down, only to recover a minute or
two later.  It almost seems as though Flask is single threaded.

Currently my production site is launched by running "python runserver.py"
which launches the app, then I use Apache HTTPd with a ProxyPass setup to
route port 80 traffic to the app.

What is the ideal way to run a production Flask app to handle maximum
volume at maximum speed?

Matt

Re: [flask] Growing pains

From:
Corey Boyle
Date:
2015-06-08 @ 17:08
http://flask.pocoo.org/docs/0.10/quickstart/#deploying-to-a-web-server

On Mon, Jun 8, 2015 at 12:56 PM, Matt Shields <matt@mattshields.org> wrote:
> I've been noticing an issue as my site continues to grow where there will be
> brief periods of the site appearing down, only to recover a minute or two
> later.  It almost seems as though Flask is single threaded.
>
> Currently my production site is launched by running "python runserver.py"
> which launches the app, then I use Apache HTTPd with a ProxyPass setup to
> route port 80 traffic to the app.
>
> What is the ideal way to run a production Flask app to handle maximum volume
> at maximum speed?
>
> Matt

Re: [flask] Growing pains

From:
Max Countryman
Date:
2015-06-08 @ 17:04
You should really not be using the development server in a production 
environment. Consider using uWSGI or Gunicorn instead.

See this page for some additional discussion: 
http://flask.pocoo.org/docs/0.10/deploying/ 
<http://flask.pocoo.org/docs/0.10/deploying/>


> On Jun 8, 2015, at 09:56, Matt Shields <matt@mattshields.org> wrote:
> 
> I've been noticing an issue as my site continues to grow where there 
will be brief periods of the site appearing down, only to recover a minute
or two later.  It almost seems as though Flask is single threaded.
> 
> Currently my production site is launched by running "python 
runserver.py" which launches the app, then I use Apache HTTPd with a 
ProxyPass setup to route port 80 traffic to the app.
> 
> What is the ideal way to run a production Flask app to handle maximum 
volume at maximum speed?
> 
> Matt

Re: [flask] Growing pains

From:
Mike Nickey
Date:
2015-06-08 @ 17:04
To: Mark S

I'd think off the top of my head that using Googles App Engine would be a
top contender for a way to manage scaling.
I'm not sure this is the *right* way but it's definitely an option.

On Mon, Jun 8, 2015 at 9:56 AM, Matt Shields <matt@mattshields.org> wrote:

> I've been noticing an issue as my site continues to grow where there will
> be brief periods of the site appearing down, only to recover a minute or
> two later.  It almost seems as though Flask is single threaded.
>
> Currently my production site is launched by running "python runserver.py"
> which launches the app, then I use Apache HTTPd with a ProxyPass setup to
> route port 80 traffic to the app.
>
> What is the ideal way to run a production Flask app to handle maximum
> volume at maximum speed?
>
> Matt
>



-- 
~MEN

Re: [flask] Growing pains

From:
Jonathan Chen
Date:
2015-06-08 @ 17:08
Hi Matt,

It sounds like you are using the development server to serve up your
application. A good production server would be uWSGI or something similar
to that one.


Thanks,

Jonathan C.
Vice President of IT | Sunrider International
http://www.sunrider.com



On Mon, Jun 8, 2015 at 9:56 AM, Matt Shields <matt@mattshields.org> wrote:

> I've been noticing an issue as my site continues to grow where there will
> be brief periods of the site appearing down, only to recover a minute or
> two later.  It almost seems as though Flask is single threaded.
>
> Currently my production site is launched by running "python runserver.py"
> which launches the app, then I use Apache HTTPd with a ProxyPass setup to
> route port 80 traffic to the app.
>
> What is the ideal way to run a production Flask app to handle maximum
> volume at maximum speed?
>
> Matt
>

-- 
CONFIDENTIALITY NOTICE: This message is intended only for the use of the 
individual or entity to which it is addressed, and may contain information 
that is privileged, confidential, and exempt from disclosure under 
applicable law. If you have received this email in error, please 
immediately notify the sender by return email and delete this email and any 
attachments from your system.