You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Oxygen
@get "/model" function()
sleep(0.15)
return json("ok")
end
serve(port = 8001)
When I build another API consuming the previous one, I reach only around 100 RPS even with multithreading (ab -n1000 -c100 'http://localhost:8002/test')
using Oxygen
using HTTP
@get "/test" function()
response = HTTP.get("http://localhost:8001/model") # sleep(0.15) - Just this line is different
return json("ok")
end
serve(port = 8002)
Changing this API to use curl instead of HTTP.jl I got a huge improvement, I go from 100 RPS to about 440 RPS
using Oxygen
@get "/test" function()
response = run(`curl http://localhost:8001/model`) # instead of HTTP.request("GET", "http://localhost:8001/model")
return json("ok")
end
serve(port = 8002)
Do you have any idea why this is happening?
Thank you for your help,
Abraham
Julia 1.10.1
HTTP.jl 1.10.2
MbedTLS.jl 1.1.9
The text was updated successfully, but these errors were encountered:
Hi everyone, thanks for your effort in developing this package
Exploring the Oxygen package to build APIs, it is based on your package, I found this:
I run this API locally and I reach about 560 RPS (ab -n1000 -c100 'http://localhost:8001/model')
When I build another API consuming the previous one, I reach only around 100 RPS even with multithreading (ab -n1000 -c100 'http://localhost:8002/test')
Changing this API to use curl instead of HTTP.jl I got a huge improvement, I go from 100 RPS to about 440 RPS
Do you have any idea why this is happening?
Thank you for your help,
Abraham
The text was updated successfully, but these errors were encountered: