Comments (3)
Yes, I'd recommend reading through https://fastapi.tiangolo.com/deployment/server-workers/ if you haven't already. The FastAPI docs are great 🎉
from ml-monitoring.
Hi there!
We looked into the tracing and found one of the bottlenecks is the prometheus-fastapi-instrumentator.
This is interesting, and I would definitely recommend raising an issue in the Github repository for that library so the maintainer is aware of the issues. However, it's not clear whether the performance issue is with prometheus-fastapi-instrumentator
or the underlying prometheus_client
library. The former is really just a convenient and lightweight wrapper around the latter.
So it seems that under high usage, the /metrics endpoint doesn't get enough resources, and hence all /metrics requests wait for some time and fail eventually. So having separate container for metrics could help.
According to the docs, you should be able to instrument your main application and then expose a second application which returns the metrics. However, both of these server processes would be running in the same container.
Good luck digging into this!
from ml-monitoring.
Thanks @jeremyjordan. I'll raise an issue on the prometheus-fastapi-instrumentator
github repository, but doesn't look like the maintainers are particularly active, but worth a try.
Would it help to increase the number of gunicorn
workers and then use prometheus_client
multiprocess mode?
from ml-monitoring.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ml-monitoring.