Configure Bokeh server allow access to IP range/network

Hi,

I am trying out a implementation of Bokeh server along with Flask within my company’s internal Network.

I have created a basic flask web application and using autoload server to fetch graph

bokeh_script = autoload_server(None
, app_path = “/attendance”
)
return render_template(‘index.html’, bokeh_script = bokeh_script)

Configured flask to use my machines IP as host so that my colleagues can access the webapp, but they are not able to view the Graph rendered by Bokeh server

I wanted to grant access to the bokeh server hosted on my machine, is there any way I can allow a range of IP address? or lets say a particular network (for eg 10.10..) ?

Searched a lot and tried using --address=0.0.0.0 while starting bokeh server, but it didn’t work.

I can manually add IP’s using –allow-websocket-origin, it works but the IP’s are not static.

Is there anyway to achieve this without manually specifying the ip’s or setting up a reverse proxy as mentioned in the user guide?

Second,

Am I following the correct way to serve a bokeh application? I am currently starting bokeh with the apps I am going to display (bokeh serve app1.py app2,py)

I used this to allow multiple users have their own session so that callbacks can be handled independently. Is this the correct/best practice?

Thanks and Regards,

Omkar.

Hi,

Looking briefly at the implementation, it seems as though

  --allow-websocket-origin=10.10.*.*

might work? It's probably fastest if you just try. If it doesn't work, then I'd say that's probably a reasonable feature, and I'd suggest making a feature request on GitHub for it. Though note, the core dev team is stretched very thing at the moment, so if you have the background and ability to contribute (with some help and guidance) that will almost certainly be the fastest way for it to be implemented.

Barring that, the other options is to embed using iframes instead of using autoload_server. This works fine and is certainly useful in some cases.

Regarding your second question, that all seems right. If you have many concurrent users, or apps that do substantial computation, you might eventually need to look at "scale out" configurations, i.e. running behind a load balancing proxy.

I will note that automated deployment of Bokeh apps is planned as a feature to anaconda.org subscriptions early in 2017 in case that is useful to know.

Thanks,

Bryan

···

On Oct 13, 2016, at 5:23 AM, Omkar Thombre <[email protected]> wrote:

Hi,

I am trying out a implementation of Bokeh server along with Flask within my company's internal Network.
I have created a basic flask web application and using autoload server to fetch graph

bokeh_script = autoload_server(None
                   , app_path = "/attendance"
      )
return render_template('index.html', bokeh_script = bokeh_script)

Configured flask to use my machines IP as host so that my colleagues can access the webapp, but they are not able to view the Graph rendered by Bokeh server

I wanted to grant access to the bokeh server hosted on my machine, is there any way I can allow a range of IP address? or lets say a particular network (for eg 10.10.*.*) ?
Searched a lot and tried using --address=0.0.0.0 while starting bokeh server, but it didn't work.

I can manually add IP's using --allow-websocket-origin, it works but the IP's are not static.
Is there anyway to achieve this without manually specifying the ip's or setting up a reverse proxy as mentioned in the user guide?

Second,
Am I following the correct way to serve a bokeh application? I am currently starting bokeh with the apps I am going to display (bokeh serve app1.py app2,py)
I used this to allow multiple users have their own session so that callbacks can be handled independently. Is this the correct/best practice?

Thanks and Regards,

Omkar.

--
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/1591f99d-7c0e-4df7-ae84-e476cfc7d0d7%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.