core-workflow icon indicating copy to clipboard operation
core-workflow copied to clipboard

Discuss for the discord-bot deployment

Open corona10 opened this issue 2 years ago • 11 comments

The short story

We need to discuss the deployment options for the discord-bot.

Long version

@Mariatta and I are developing a discord bot that will utilize OpenAI APIs to enhance the productivity of the core development team. Currently, the bot is deployed on my Azure server(Standard D2as v4), but this setup is not sustainable. We would like to explore alternative options, such as requesting a quota for PSF Heroku deployment or any other viable alternatives. It would be greatly appreciated if we could discuss this matter further.

cc @python/infrastructure-staff

corona10 avatar Mar 24 '23 13:03 corona10

What is the timeline?

ewdurbin avatar Mar 24 '23 14:03 ewdurbin

What is the timeline?

There is currently no set timeline, but I hope to transition to an infrastructure that can be managed collaboratively, if possible. It is not a problem if the discussion takes some time. :)

corona10 avatar Mar 24 '23 14:03 corona10

Really the only reason I'm asking is PyCon prep! If I don't have better information for you next week, we'll get you setup on Heroku.

What sort of resource requirements are you expecting in terms of RAM/CPU?

ewdurbin avatar Mar 24 '23 14:03 ewdurbin

What sort of resource requirements are you expecting in terms of RAM/CPU?

I guess that the Standard 2X will be enough. Please let me know if this is too expensive.

corona10 avatar Mar 24 '23 14:03 corona10

What is the functionality of the bot? That's a pretty big dyno. The PSF is currently footing bill for Heroku as they never relaunched their credit program, so that is a bit steep.

Do you have any metrics on the running instance to estimate the need a bit more precisely?

ewdurbin avatar Mar 24 '23 14:03 ewdurbin

The PSF is currently footing bill for Heroku as they never relaunched their credit program, so that is a bit steep

Oh, in that case, please provide the minimal resource that can be provided. I will explore other options if the minimum resources are insufficient. Currently, the application only communicates with the OpenAI server and the only computational operation involves using the tiktoken library.

corona10 avatar Mar 24 '23 14:03 corona10

Do you have any metrics on the running instance to estimate the need a bit more precisely?

Since this is the discord bot with limited people, traffic will not be over 20 requests per minute .

corona10 avatar Mar 24 '23 15:03 corona10

We also don't need it to be in Heroku. If there is other platform that The PSF recommends that is more affordable, we can go with that.

Mariatta avatar Mar 24 '23 15:03 Mariatta

I'm no web expert, but it seems like you could run many such bots and other services on a DO $5/mo. VPS, assuming you don't already have one handy.

CAM-Gerlach avatar Mar 24 '23 16:03 CAM-Gerlach

There's good stuff on the horizon for Heroku type experience. We're actively working to get the same platform that deploys PyPI setup so it is user friendly enough to move all our Heroku apps. Sounds like discord-bot is a good candidate for the first one.

Marginal cost of running something like this is well less that $5/mo :)

We're close but I can't say "before PyCon" close at this time.

ewdurbin avatar Mar 24 '23 16:03 ewdurbin

We're close but I can't say "before PyCon" close at this time.

I can wait :)

corona10 avatar Mar 25 '23 09:03 corona10