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

use basic http polling for api #997

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

kning
Copy link
Contributor

@kning kning commented Nov 26, 2024

there have been cases of users intermittently hitting websocket timeout errors in api mode. other customers i've talked to have mentioned how using plain http requests seems to solve that issue, so this reimplements the api portion of the example to just plain http.

did some basic load testing (up to 30 concurrent requests) and wasn't able to observe any errors in a 10 minute or so time window.

Type of Change

  • New example
  • Example updates (Bug fixes, new features, etc.)
  • Other (changes to the codeb
Screenshot 2024-11-26 at 3 44 58 PM ase, but not to examples)

Checklist

  • Example is testable in synthetic monitoring system, or lambda-test: false is added to example frontmatter (---)
    • Example is tested by executing with modal run or an alternative cmd is provided in the example frontmatter (e.g. cmd: ["modal", "deploy"])
    • Example is tested by running with no arguments or the args are provided in the example frontmatter (e.g. args: ["--prompt", "Formula for room temperature superconductor:"]
  • Example is documented with comments throughout, in a Literate Programming style.
  • Example does not require third-party dependencies to be installed locally
  • Example pins its dependencies
    • Example pins container images to a stable tag, not a dynamic tag like latest
    • Example specifies a python_version for the base image, if it is used
    • Example pins all dependencies to at least minor version, ~=x.y.z or ==x.y
    • Example dependencies with version < 1 are pinned to patch version, ==0.y.z

Outside contributors

You're great! Thanks for your contribution.

@charlesfrye
Copy link
Collaborator

🚀 The docs preview is ready! Check it out here: https://modal-labs-examples--frontend-preview-865c904.modal.run

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

Successfully merging this pull request may close these issues.

2 participants