Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce Costs by Minimizing Service Usage or Deactivation When Not Needed or in Idle #2022

Open
YIN-Renlong opened this issue Oct 5, 2024 · 5 comments

Comments

@YIN-Renlong
Copy link
Contributor

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  1. Deploy the azure-search-openai-demo app on Azure.
  2. Keep the app running 24/7, observe the consumption costs.

Any log messages given by the failure

None

Expected/desired behavior

I have noticed that running the app 24 hours a day incurs a daily cost of around $30, with the most significant cost coming from "Azure Cognitive Search." I would like to have an option to reduce the consumption costs by:

  1. Automatically pausing or shutting down services when not in use.
  2. Minimizing resource usage when the app is idle.
  3. Any alternative suggestions to lower costs while keeping the app functional on-demand.

OS and Version?

macOS (Ventura)

azd version?

azd version 1.9.5

Versions

Python 3.10, Node.js 18

Mention any other details that might be useful

Currently, the daily cost of running the app 24 hours a day is approximately $30, primarily due to Azure Cognitive Search. I am looking for ways to reduce this, especially when the app is not actively being used. Are there any options for configuring services like Azure AI Search or Azure OpenAI to minimize resource consumption when idle or to activate only when needed?


Thanks! We'll be in touch soon.

@bnodir
Copy link
Contributor

bnodir commented Oct 10, 2024

How about deploying with minimal costs(Use the free tier of Azure AI Search). Have you considered trying that?

@YIN-Renlong
Copy link
Contributor Author

YIN-Renlong commented Oct 11, 2024

How about deploying with minimal costs(Use the free tier of Azure AI Search). Have you considered trying that?

@bnodir Thank you for your suggestion! While I’m happy to pay for the services I use (as the free tier’s limits and performance don’t meet my needs), my main concern is the cost incurred when the service is idle, such as during nights and weekends. My original question was about finding a way to avoid these idle-time costs—for example, by automatically shutting down or minimizing the service during these periods, and then re-enabling it within 10-20 minutes when needed.

Deleting and redeploying resources isn’t practical in my case, as I manage a large volume of documents. The redeployment process would take significant time and add further costs due to the digest process.

Do you have any suggestions that could address this issue?

@bnodir
Copy link
Contributor

bnodir commented Oct 14, 2024

@YIN-Renlong - For the digest process, I recommend using local PDF/CSV parsers if your documents are in those formats. However, I agree that redeployment is not the best option due to the time it consumes.

@YIN-Renlong
Copy link
Contributor Author

@bnodir Thanks for the suggestions. I would be more than willing to explore the option of deploying the app locally and utilizing the API only when necessary. However, I am concerned about whether this approach might impact performance, especially during more demanding tasks.

I am very interested in a solution that focuses on local deployment as much as possible, as there are many scenarios where continuous online deployment isn't required. Minimizing the usage of cloud resources could significantly help reduce costs. However, from what I can see, this project doesn't seem to have a branch or pathway that fully supports local deployment yet, right? I would really appreciate hearing more of your thoughts or recommendations on this approach. Looking forward to your insights.

@cforce
Copy link

cforce commented Oct 14, 2024

Is there a feature comparison between localpdf parser and Azure Document Intelligence? What shall a at all not always use the local pdf parser?
Especially how about image got vision recognition with or without vision in this context?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants