Deploying rasa

Hi, hope everyone doing well. :smile: I had a doubt regarding deploying rasa open source on the production environment.

First of all thing, is it recommended to deploy the open source on the production environment?

We have deployed it using some patchwork, As of now we are you two different ports to run the rasa API using the command (rasa run), and those two servers run in a flask app and then that flask app runs via the docker environment.

Now during the agent training, that model is created and loaded in one of the apis’s. We are using a global dictionary to store the loaded agent in an object, thus allowing us to keep multiple agent objects, such that we don’t have to load the model on run-time.

Now as we shift to the Kubernetes environment during the pods upscaling that global dictionary gets reset, thus we are left with an empty dictionary at runtime.

Is there could be any better way to achieve this? Is it even a good way to run multiple rasa servers using the Flask app?

Any suggestion will be helpful.

Rasa ships with a high performance server implementation called Sanic so you should probably keep using that instead of keeping that behind Flask. Since you are in Kubernetes environment, it is best to just deploy these models as separate pods in the cluster and maintain a registry of them somewhere else in the cluster. Hope this helps.

1 Like