bokeh server production deployment

The new docs say this about bokeh-server:

The Bokeh library also ships with a standalone executable bokeh-server that you can easily run to try out server examples, for prototyping, etc. however it is not intended for production use.

  1. What are the current best practices for deploying something like the stock_app example to production?

  2. How are these best practices likely to change as bokeh-server is developed into its own, standalone package?

Any advice on this? Particularly the first question?

···

On Wednesday, May 27, 2015 at 11:41:08 AM UTC-4, Schaun Wheeler wrote:

The new docs say this about bokeh-server:

The Bokeh library also ships with a standalone executable bokeh-server that you can easily run to try out server examples, for prototyping, etc. however it is not intended for production use.

  1. What are the current best practices for deploying something like the stock_app example to production?
  1. How are these best practices likely to change as bokeh-server is developed into its own, standalone package?

Just checking in one more time to see if anyone has any advice or best practices for deploying Bokeh apps in production. I’m concerned that the docs say bokeh-server isn’t intended for production use. What am I supposed to use instead?

···

On Saturday, May 30, 2015 at 12:21:48 PM UTC-4, Schaun Wheeler wrote:

Any advice on this? Particularly the first question?

On Wednesday, May 27, 2015 at 11:41:08 AM UTC-4, Schaun Wheeler wrote:

The new docs say this about bokeh-server:

The Bokeh library also ships with a standalone executable bokeh-server that you can easily run to try out server examples, for prototyping, etc. however it is not intended for production use.

  1. What are the current best practices for deploying something like the stock_app example to production?
  1. How are these best practices likely to change as bokeh-server is developed into its own, standalone package?

Good question , I am interested in this too…

···

On Wednesday, June 10, 2015 at 8:13:10 PM UTC-7, Schaun Wheeler wrote:

Just checking in one more time to see if anyone has any advice or best practices for deploying Bokeh apps in production. I’m concerned that the docs say bokeh-server isn’t intended for production use. What am I supposed to use instead?

On Saturday, May 30, 2015 at 12:21:48 PM UTC-4, Schaun Wheeler wrote:

Any advice on this? Particularly the first question?

On Wednesday, May 27, 2015 at 11:41:08 AM UTC-4, Schaun Wheeler wrote:

The new docs say this about bokeh-server:

The Bokeh library also ships with a standalone executable bokeh-server that you can easily run to try out server examples, for prototyping, etc. however it is not intended for production use.

  1. What are the current best practices for deploying something like the stock_app example to production?
  1. How are these best practices likely to change as bokeh-server is developed into its own, standalone package?

Hi all,

Sarah has some instructions for deploying the bokeh-server to Heroku here https://github.com/birdsarah/bokeh-server-heroku .

I’m not sure if this will work for large scale or robust apps. I’ve only tried it for small examples such as the default bokeh stock_app.

Kind regards,

Camilla

···

2015-06-11 5:24 GMT+01:00 Andrew Joros [email protected]:

Good question , I am interested in this too…

On Wednesday, June 10, 2015 at 8:13:10 PM UTC-7, Schaun Wheeler wrote:

Just checking in one more time to see if anyone has any advice or best practices for deploying Bokeh apps in production. I’m concerned that the docs say bokeh-server isn’t intended for production use. What am I supposed to use instead?

On Saturday, May 30, 2015 at 12:21:48 PM UTC-4, Schaun Wheeler wrote:

Any advice on this? Particularly the first question?

On Wednesday, May 27, 2015 at 11:41:08 AM UTC-4, Schaun Wheeler wrote:

The new docs say this about bokeh-server:

The Bokeh library also ships with a standalone executable bokeh-server that you can easily run to try out server examples, for prototyping, etc. however it is not intended for production use.

  1. What are the current best practices for deploying something like the stock_app example to production?
  1. How are these best practices likely to change as bokeh-server is developed into its own, standalone package?

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/f64d204e-6f6e-4268-855d-c675a41c749c%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi all,

I am also interested in this topic, and any advice from people with experience would be very useful.

I have tried to deploy the stock_app based on the the example from Sarah, which is linked above. The app works as expected in my machine, but failed to deploy it at Heroku because of the app slug size exceeding 300Mb - the Heroku slug size limit. Moreover, the example from Sarah doesn’t work at pythonanywhere.com as they don’t support non-WSGI applications.

I would greatly appreciate it if anyone with an experience gives a clear guide on this.

Best,

Yabebal

···

On Thu, Jun 11, 2015 at 11:01 AM, Camilla [email protected] wrote:

Hi all,

Sarah has some instructions for deploying the bokeh-server to Heroku here https://github.com/birdsarah/bokeh-server-heroku .

I’m not sure if this will work for large scale or robust apps. I’ve only tried it for small examples such as the default bokeh stock_app.

Kind regards,

Camilla

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAHh6JBz0BmiB5VLDD9aYJ9CrwHHosJe4QvJ25bAHVLCnDJRhCQ%40mail.gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

2015-06-11 5:24 GMT+01:00 Andrew Joros [email protected]:

Good question , I am interested in this too…

On Wednesday, June 10, 2015 at 8:13:10 PM UTC-7, Schaun Wheeler wrote:

Just checking in one more time to see if anyone has any advice or best practices for deploying Bokeh apps in production. I’m concerned that the docs say bokeh-server isn’t intended for production use. What am I supposed to use instead?

On Saturday, May 30, 2015 at 12:21:48 PM UTC-4, Schaun Wheeler wrote:

Any advice on this? Particularly the first question?

On Wednesday, May 27, 2015 at 11:41:08 AM UTC-4, Schaun Wheeler wrote:

The new docs say this about bokeh-server:

The Bokeh library also ships with a standalone executable bokeh-server that you can easily run to try out server examples, for prototyping, etc. however it is not intended for production use.

  1. What are the current best practices for deploying something like the stock_app example to production?
  1. How are these best practices likely to change as bokeh-server is developed into its own, standalone package?

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/f64d204e-6f6e-4268-855d-c675a41c749c%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

yabebal

Hi all,

I am also interested in this topic, and any advice from people with
experience would be very useful.

I have tried to deploy the stock_app based on the the example from Sarah,
which is linked above. The app works as expected in my machine, but failed
to deploy it at Heroku because of the app slug size exceeding 300Mb - the
Heroku slug size limit. Moreover, the example from Sarah doesn't work at
pythonanywhere.com as they don't support non-WSGI applications.

I would greatly appreciate it if anyone with an experience gives a clear
guide on this.

Best,
Yabebal

The Bokeh server is a tornado app, which I believe you can get a wsgi app
out of, wouldn't that work?

···

On Thu, Jun 11, 2015 at 1:46 PM, Yabebal Tadesse <[email protected]> wrote:

Hi all,

Thanks for this important discussion. It's perhaps the case the the admonition in the docs was a little too strong. The "bokeh-server" app is a just a basic tornado server, it illustrates just about the simplest possible usage of bokeh server WSGI app. The intent behind the warning is to convey that to deploy the bokeh server means to deploy it into *your* network, and so requires knowledge and information about your particulars. By definition, it is *highly dependent on your particular situation and setup**. Basically the warning is just a statement that there is no way we can anticipate all possible configurations of flask, gunicorn, tornado, asyncio, pyramid, nginx, cherrypy, supervisord, number of worker processes, proxies, etc.... that everyone might use.

We do hope to provide some suggestions for a few example deployment scenarios, but we are just now in the middle of revisiting some core parts of the server, in an attempt to make it even better and more focused. These recommendations will have to wait until this Summer's work is completed, because they are dependent on what some of those (potentially substantial) changes will be.

As a potential reference, below are some of the steps we took to "deploy" the bokeh server for our server gallery, in case it is useful. But note that even this is probably not really complete, as there is no supervisord or other monitoring integration, or automation (this was done by hand).

* screen 1

   source activate bokeh
   redis-server --port 7001

* screen 2

   source activate bokeh
   gunicorn -k tornado -w 4 "bokeh.server.start:make_tornado(config_file='config.py')" --log-level=debug --log-file=- -b 0.0.0.0:5006

* screen 3

   source activate bokeh
   cd ~/bokeh/examples/deploy
   python forwarder.py

With a config.py similar to:

  pub_zmqaddr ="ipc:///tmp/0"
  sub_zmqaddr ="ipc:///tmp/1"
  run_forwarder = False
  model_backend = {'type' : 'redis', 'redis_port' : 7001, 'start-redis' : False}
  secret_key = "<<secret key>>"
  multi_user = True
  scripts = [ <<paths to scripts to load>> ]

···

On Jun 11, 2015, at 12:46 PM, Yabebal Tadesse <[email protected]> wrote:

Hi all,

I am also interested in this topic, and any advice from people with experience would be very useful.

I have tried to deploy the stock_app based on the the example from Sarah, which is linked above. The app works as expected in my machine, but failed to deploy it at Heroku because of the app slug size exceeding 300Mb - the Heroku slug size limit. Moreover, the example from Sarah doesn't work at pythonanywhere.com as they don't support non-WSGI applications.

I would greatly appreciate it if anyone with an experience gives a clear guide on this.

Best,
Yabebal

On Thu, Jun 11, 2015 at 11:01 AM, Camilla <[email protected]> wrote:
Hi all,

Sarah has some instructions for deploying the bokeh-server to Heroku here https://github.com/birdsarah/bokeh-server-heroku .
I'm not sure if this will work for large scale or robust apps. I've only tried it for small examples such as the default bokeh stock_app.

Kind regards,
Camilla

2015-06-11 5:24 GMT+01:00 Andrew Joros <[email protected]>:
Good question , I am interested in this too...

On Wednesday, June 10, 2015 at 8:13:10 PM UTC-7, Schaun Wheeler wrote:
Just checking in one more time to see if anyone has any advice or best practices for deploying Bokeh apps in production. I'm concerned that the docs say bokeh-server isn't intended for production use. What am I supposed to use instead?

On Saturday, May 30, 2015 at 12:21:48 PM UTC-4, Schaun Wheeler wrote:
Any advice on this? Particularly the first question?

On Wednesday, May 27, 2015 at 11:41:08 AM UTC-4, Schaun Wheeler wrote:
The new docs say this about bokeh-server:

The Bokeh library also ships with a standalone executable bokeh-server that you can easily run to try out server examples, for prototyping, etc. however it is not intended for production use.

1. What are the current best practices for deploying something like the stock_app example to production?
2. How are these best practices likely to change as bokeh-server is developed into its own, standalone package?

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/f64d204e-6f6e-4268-855d-c675a41c749c%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAHh6JBz0BmiB5VLDD9aYJ9CrwHHosJe4QvJ25bAHVLCnDJRhCQ%40mail.gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

--
yabebal

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAFkS%3DPbgnwj9dJ9nU5JmOGABMxQkif-uehNUn7o_4cXMNOtJ2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi all,

In addition to what Bryan mentioned. Here’s a quick supervisord.conf configuration file that you can tweak and use as a template to automate this with supervisord:

[supervisorctl]
username=

[supervisord]
logfile=supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=true ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)

[program:redis]
command=redis-server --port 7001
priority=1

[program:serve_bokeh]
command=gunicorn -k tornado -w 4 “bokeh.server.start:make_tornado(config_file=‘config.py’)” --log-level=debug --log-file=gunicorn.log --access-logfile=gunicorn_access.log -b 0.0.0.0:5006
priority=2
redirect_stderr=true

[program:forwarder]
command=python forwarder.py
priority=3
redirect_stderr=true

use this if you want to serve your app outside of bokeh-server (embedded into a separate Flask application like in the stocks example)

[program:<your_app>]
command=python <<your_app>>.py
priority=4
redirect_stderr=true

``

Cheers

Fabio

···

On Friday, June 12, 2015 at 4:46:06 AM UTC+2, Bryan Van de ven wrote:

Hi all,

Thanks for this important discussion. It’s perhaps the case the the admonition in the docs was a little too strong. The “bokeh-server” app is a just a basic tornado server, it illustrates just about the simplest possible usage of bokeh server WSGI app. The intent behind the warning is to convey that to deploy the bokeh server means to deploy it into your network, and so requires knowledge and information about your particulars. By definition, it is highly dependent on your particular situation and setup*. Basically the warning is just a statement that there is no way we can anticipate all possible configurations of flask, gunicorn, tornado, asyncio, pyramid, nginx, cherrypy, supervisord, number of worker processes, proxies, etc… that everyone might use.

We do hope to provide some suggestions for a few example deployment scenarios, but we are just now in the middle of revisiting some core parts of the server, in an attempt to make it even better and more focused. These recommendations will have to wait until this Summer’s work is completed, because they are dependent on what some of those (potentially substantial) changes will be.

As a potential reference, below are some of the steps we took to “deploy” the bokeh server for our server gallery, in case it is useful. But note that even this is probably not really complete, as there is no supervisord or other monitoring integration, or automation (this was done by hand).

  • screen 1

    source activate bokeh

    redis-server --port 7001

  • screen 2

    source activate bokeh

    gunicorn -k tornado -w 4 “bokeh.server.start:make_tornado(config_file=‘config.py’)” --log-level=debug --log-file=- -b 0.0.0.0:5006

  • screen 3

    source activate bokeh

    cd ~/bokeh/examples/deploy

    python forwarder.py

With a config.py similar to:

    pub_zmqaddr ="ipc:///tmp/0"
    sub_zmqaddr ="ipc:///tmp/1"
    run_forwarder = False
    model_backend = {'type' : 'redis', 'redis_port' : 7001, 'start-redis' : False}
    secret_key = "<<secret key>>"
    multi_user = True
    scripts = [ <<paths to scripts to load>> ]

On Jun 11, 2015, at 12:46 PM, Yabebal Tadesse [email protected] wrote:

Hi all,

I am also interested in this topic, and any advice from people with experience would be very useful.

I have tried to deploy the stock_app based on the the example from Sarah, which is linked above. The app works as expected in my machine, but failed to deploy it at Heroku because of the app slug size exceeding 300Mb - the Heroku slug size limit. Moreover, the example from Sarah doesn’t work at pythonanywhere.com as they don’t support non-WSGI applications.

I would greatly appreciate it if anyone with an experience gives a clear guide on this.

Best,

Yabebal

On Thu, Jun 11, 2015 at 11:01 AM, Camilla [email protected] wrote:

Hi all,

Sarah has some instructions for deploying the bokeh-server to Heroku here https://github.com/birdsarah/bokeh-server-heroku .
I’m not sure if this will work for large scale or robust apps. I’ve only tried it for small examples such as the default bokeh stock_app.

Kind regards,

Camilla

2015-06-11 5:24 GMT+01:00 Andrew Joros [email protected]:

Good question , I am interested in this too…

On Wednesday, June 10, 2015 at 8:13:10 PM UTC-7, Schaun Wheeler wrote:

Just checking in one more time to see if anyone has any advice or best practices for deploying Bokeh apps in production. I’m concerned that the docs say bokeh-server isn’t intended for production use. What am I supposed to use instead?

On Saturday, May 30, 2015 at 12:21:48 PM UTC-4, Schaun Wheeler wrote:

Any advice on this? Particularly the first question?

On Wednesday, May 27, 2015 at 11:41:08 AM UTC-4, Schaun Wheeler wrote:

The new docs say this about bokeh-server:

The Bokeh library also ships with a standalone executable bokeh-server that you can easily run to try out server examples, for prototyping, etc. however it is not intended for production use.

  1. What are the current best practices for deploying something like the stock_app example to production?
  1. How are these best practices likely to change as bokeh-server is developed into its own, standalone package?


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/f64d204e-6f6e-4268-855d-c675a41c749c%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAHh6JBz0BmiB5VLDD9aYJ9CrwHHosJe4QvJ25bAHVLCnDJRhCQ%40mail.gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.


yabebal


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAFkS%3DPbgnwj9dJ9nU5JmOGABMxQkif-uehNUn7o_4cXMNOtJ2Q%40mail.gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.