devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click!
https://waha.devlike.pro/
Apache License 2.0
820 stars 249 forks source link

[Feature Request] Kubernetes support #245

Closed eletroswing closed 4 months ago

eletroswing commented 6 months ago

I want to run the project in kubernetes with hpa for autoscaling and I want to have just one api for interacting with all pods and instances.

Has anyone managed to do something similar or does the project have a plan to implement Kubernetes support?

allburov commented 6 months ago

Hi! The main problem here is that our pods have state (running sessions), it's not stateless application, it's state full application. What you're referring to is more like "SaaS solution build on top of Kubernetes".

the project have a plan to implement Kubernetes support

That option would be available only in really costly price (because of the effort for that project) - like $5K per year with no session limits or like $19 per session per month.

We didn't see anyone interested in that, because for that there're many already implemented SaaS available - I'd recommend using them instead - https://maytapi.com/

Even tho right now it's technicaly not possible due to no remote storage support https://github.com/devlikeapro/whatsapp-http-api/issues/41 We're adding it in 2024 (remote storage, not Kubernetes one) :crossed_fingers:

devlikepro commented 4 months ago

Hi! We know that it's been more then a year since the request was requested, but we're happy to announce MongoDB remote storage for authentication data is available in 2023.4.2 version!

This feature is now available as part of the WAHA Plus offering.

We have documented the feature and its usage in our documentation, available at Session Storage.


To get started with the MongoDB storage, you can follow these simple steps:

First, start the MongoDB server by running the following command:

docker run -d -p 27017:27017 --name mongodb mongo

Next, initiate the WAHA with the WHATSAPP_SESSIONS_MONGO_URL environment variable, and note the use of the --network host option as well:

docker run -e WHATSAPP_SESSIONS_MONGO_URL=mongodb://localhost:27017/ --network host devlikeapro/whatsapp-http-api-plus

Following these steps, you will have successfully configured the MongoDB storage for WAHA. All session authentication data will now be stored in the MongoDB database.

For those of you eager to test this new feature, we would like to stress the importance of thoroughly testing MongoDB storage before deploying it in any production-related infrastructure.

patron:PRO

devlikepro commented 4 months ago

If you're interested in "clustered version" of the project for Kubernetes (where sessions would be automatically redistributed between working pods) - please create a dedicated issue and we'll see how many people are interested in it and how we can achieve it using the same donation volume.

patron:PRO