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

Ray Serve with Fastapi is a lot (10x) slower than plain fastapi #46693

Closed
githuberj opened this issue Jul 18, 2024 · 2 comments
Closed

Ray Serve with Fastapi is a lot (10x) slower than plain fastapi #46693

githuberj opened this issue Jul 18, 2024 · 2 comments
Labels
bug Something that is supposed to be working; but isn't serve Ray Serve Related Issue triage Needs triage (eg: priority, bug/not-bug, and owning component)

Comments

@githuberj
Copy link

What happened + What you expected to happen

I have an issue or maybe just a wrong expectation while working with ray serve .
I thought it might be able to run our whole fastapi application but it looks like it might be 10x slower that a normal fastapi application. Therefore I did this small benchmark.
Maybe the benchmark is too simplistic. Could you provide a more comprehensive example then?
I would just like to have our expectations set: Is it a bad idea to put general application logic into Ray?

Versions / Dependencies

ray[serve] == 2.32.0
fastapi == 0.111.1

Reproduction script

I used docker to test it and provided a zip file.
benchmark.zip

Issue Severity

Low: It annoys or frustrates me.

@githuberj githuberj added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jul 18, 2024
@Superskyyy
Copy link
Contributor

Hello, see this related issue, but in general Ray serve is not expected to deliver high qps like normal FastAPI as it has a single point of ingress (proxy actor) that brings additional overhead, but I expect the overhead can be lowered in the future.

@anyscalesam anyscalesam added the serve Ray Serve Related Issue label Jul 24, 2024
@githuberj
Copy link
Author

Thank you for the response. I will close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't serve Ray Serve Related Issue triage Needs triage (eg: priority, bug/not-bug, and owning component)
Projects
None yet
Development

No branches or pull requests

3 participants