librelist archives

« back to archive

Quickest and cheapest deployment

Quickest and cheapest deployment

From:
Mark Grey
Date:
2013-03-21 @ 15:55
Hello all,

I've got a simple internal service written in Flask that we're going to be
using purely as an internal tool.  It will occupy an entire AWS ec2
instance and will be able to run exclusively on port 80.

I'm wondering what you guys think is the best and quickest wrapper to throw
around Flask (gunicorn, cherry, etc) where no reverse proxying will be
required at all.  Speed of deployment being the operational goal.  The only
deployments I've ever done were behind nginx.

Thanks!

Re: [flask] Quickest and cheapest deployment

From:
Shawn Milochik
Date:
2013-03-21 @ 16:06
I love gunicorn + nginx. Nearly zero setup, works great.

Re: [flask] Quickest and cheapest deployment

From:
Philip Goh
Date:
2013-03-21 @ 17:42
On 21 Mar 2013 16:07, "Shawn Milochik" <shawn@milochik.com> wrote:
>
> I love gunicorn + nginx. Nearly zero setup, works great.

If you're using gunicorn and it's an internal app,  why the need for nginx?
Gunicorn can spawn multiple processes and perform rudimentary load
balancing. We don't need reverse proxies.

What does nginx bring to the table in this instance?

Kind regards,
Philip

Re: [flask] Quickest and cheapest deployment

From:
Andy Parsons
Date:
2013-03-21 @ 17:51
It's handy to let nginx serve static assets in a setup like this. 

On Mar 21, 2013, at 1:42 PM, Philip Goh <philip.wj.goh@gmail.com> wrote:

> 
> On 21 Mar 2013 16:07, "Shawn Milochik" <shawn@milochik.com> wrote:
> >
> > I love gunicorn + nginx. Nearly zero setup, works great.
> 
> If you're using gunicorn and it's an internal app,  why the need for 
nginx? Gunicorn can spawn multiple processes and perform rudimentary load 
balancing. We don't need reverse proxies.
> 
> What does nginx bring to the table in this instance?
> 
> Kind regards, 
> Philip 

Re: [flask] Quickest and cheapest deployment

From:
Mark Pors
Date:
2013-03-21 @ 18:20
From the documentation: "Without this buffering Gunicorn will be easily
susceptible to denial-of-service attacks."
http://docs.gunicorn.org/en/latest/deploy.html


On Thu, Mar 21, 2013 at 7:42 PM, Philip Goh <philip.wj.goh@gmail.com> wrote:

>
> On 21 Mar 2013 16:07, "Shawn Milochik" <shawn@milochik.com> wrote:
> >
> > I love gunicorn + nginx. Nearly zero setup, works great.
>
> If you're using gunicorn and it's an internal app,  why the need for
> nginx? Gunicorn can spawn multiple processes and perform rudimentary load
> balancing. We don't need reverse proxies.
>
> What does nginx bring to the table in this instance?
>
> Kind regards,
> Philip
>

Re: [flask] Quickest and cheapest deployment

From:
Shawn Milochik
Date:
2013-03-21 @ 18:06
On Thu, Mar 21, 2013 at 1:42 PM, Philip Goh <philip.wj.goh@gmail.com> wrote:
> If you're using gunicorn and it's an internal app,  why the need for nginx?
> Gunicorn can spawn multiple processes and perform rudimentary load
> balancing. We don't need reverse proxies.
>
> What does nginx bring to the table in this instance?
>
> Kind regards,
> Philip

In addition, you can have an application served at an easy-to-use
domain name instead of requiring your users to type
"ip_address:port_number." Sure, you could serve it at port 80, but you
still don't have the option of subdomains or HTTPS (security is
important, even internally).

Plus, it's literally one line in your nginx config file, just
"proxy_pass http://127.0.0.1:9999;" (or whatever your port number is).
You're not saving much effort by skipping it.

Re: [flask] Quickest and cheapest deployment

From:
Anthony Ford
Date:
2013-03-21 @ 18:18
If you really don't want to use nginx to serve your static assets, you can
use s3 to host them. It's what I did on a couple of my asps hosted on
Heroku.

Ford
ford.anthony@gmail.com
http://ajford.us
On Mar 21, 2013 1:06 PM, "Shawn Milochik" <shawn@milochik.com> wrote:

> On Thu, Mar 21, 2013 at 1:42 PM, Philip Goh <philip.wj.goh@gmail.com>
> wrote:
> > If you're using gunicorn and it's an internal app,  why the need for
> nginx?
> > Gunicorn can spawn multiple processes and perform rudimentary load
> > balancing. We don't need reverse proxies.
> >
> > What does nginx bring to the table in this instance?
> >
> > Kind regards,
> > Philip
>
> In addition, you can have an application served at an easy-to-use
> domain name instead of requiring your users to type
> "ip_address:port_number." Sure, you could serve it at port 80, but you
> still don't have the option of subdomains or HTTPS (security is
> important, even internally).
>
> Plus, it's literally one line in your nginx config file, just
> "proxy_pass http://127.0.0.1:9999;" (or whatever your port number is).
> You're not saving much effort by skipping it.
>