Kinto / kinto

A generic JSON document store with sharing and synchronisation capabilities.
http://docs.kinto-storage.org/
Other
4.33k stars 422 forks source link

Production deployment of kinto-server with Docker #2158

Open adebisi-fa opened 5 years ago

adebisi-fa commented 5 years ago

Hello,

A sincere appreciation to the entire kinto team for this wonderful and brilliant solution! Kinto truly rocks!!!

It was mentioned in the documentation that uwsgi is the preferred way to run kinto in production, as it could be deployed behind a proxy server (e.g. nginx).

Kinto Local Server, kinto start ... was discouraged as not production ready, (maybe due to pserve's limitation facing the internet directly or something). However, the Docker image uses, kinto start, and it appears that's the only way to run kinto server on docker or other orchestrators.

So, is it technically (performance wise) possible to deploy kinto with the following configuration, as an alternative to the uwsgi, in production? Viz:

nginx --proxy--> kinto start . . . instances (scaled by supervisord, or any docker orchestrator)

Thanks, please.

Foluso.

Natim commented 5 years ago

I use a custom Dockerfile with that installs uwsgi and run:

/usr/local/bin/uwsgi --ini kinto.ini

adebisi-fa commented 5 years ago

Ooh, awesome!!

Please, is there a technical reason why the official docker image isn't using /usr/local/bin/uwsgi --ini kinto.ini (after installing uwsgi) in place of kinto start --ini kinto.ini?

Thanks, please.

Natim commented 5 years ago

That's a good point, I guess we can change that.

Natim commented 5 years ago

I had a closer look at the Dockerfile, and it seems to be designed for a quick launch (with the memory backend and all) and not for a production use.

I would be glad to know what others think about it.

I guess I would recommand you to build your own Dockerfile based on this one: https://github.com/mozilla-services/kinto-dist/blob/master/Dockerfile

leplatrem commented 5 years ago

I think it would make sense that the official container could be used in production.

Is uwsgi really slower to start?

Natim commented 5 years ago

No uwsgi is not slower, what I meant was more that the image does all the setup and things at once (create the ini file, etc.) I meant quick launch like no config.