-
Notifications
You must be signed in to change notification settings - Fork 51
Proposal: proxy-less mode #48
Comments
In one of the earlier prototypes of Osiris, Prometheus was used for collecting metrics. iirc, we ripped it out because asking users (especially ones who might already have been using it) to configure Prometheus a particular way undermined the "it just works" narrative. I can see what you have proposed as being, perhaps, more tenable. If you don't want to mess with your Prometheus configuration or don't want to run Prometheus at all, Osiris still works out-of-the-box with its default metrics collector. "Advanced users" can have the option to do things differently. That being said, I'm a little bit reluctant to accept this level of new complexity, even as an option, primarily because I can't guarantee any significant resource commitments to this project at the moment. I can say that I'd at least be willing to entertain some kind of PoC here, but the likelihood of moving forward or not is going to end up being directly proportionate to how much complexity and/or maintenance burden the PoC shows needs to be added. |
Hi, thanks for the answer. ok, I'll write a quick POC to see how it goes. |
This change decouples the metrics collection and scraping, and allows custom scrapers. The default scraper stays the osiris one, using the auto-injected sidecar container. And we introduce a new scraper, using the prometheus format. It doesn't require the osiris proxy, and instead scrap metrics from a application-provided prometheus-compliant endpoint. see deislabs#48 for more details
I'm a big fan of the idea of an advanced configuration for power users/use cases. Although I prefer a multi-annotations configuration over one big JSON : osiris.deislabs.io/inject-proxy: "false" # default "true", when true the other annotations are useless
zeroscaler.osiris.deislabs.io/metrics-collector: prometheus # default "prometheus"
zeroscaler.osiris.deislabs.io/metrics-port: "9001" # default "9090"
zeroscaler.osiris.deislabs.io/opened-connections-metric: http_req_new # default "http_req_new"
zeroscaler.osiris.deislabs.io/closed-connections-metric: http_req_closed # default "http_req_closed" I have taken inspiration from what Nginx Ingress Controller does. |
@josephpage please don't follow any of those approaches. The only reason why ingress-nginx uses/d annotations is that at the time (four years ago) there was no other option. This kind of customization should be done with CRDs |
That won't get merged. Osiris has deliberately shunned the use of CRDs and embraced annotations to maximize simplicity. The idea was that you use normal resources the same as you would if scale-to/from-zero were not a concern and then you enable that feature by annotating those resources. I'm relatively neutral on whether that was a good decision or not, but my point is that we're not going to reverse course on that at this stage-- especially given that (as I've noted before) there isn't a large resource commitment to this project at the moment. So, all of the above being said:
☝️ I agree with this. |
@krancour to be clear, I am not trying to propose this change, just talking about my (bad) experience with annotations, once you have more than just a few (mainly due to the lack of real types, where everything is a string and interactions between multiple annotations) |
This is a proposal for a new feature, so we can get an agreement before starting coding ;-)
The idea is to allow multiple implementations of the "metrics collector", with the default one still being the osiris auto-injected proxy, and with at least a new one: a prometheus-based metrics collector.
This new collector would collect metrics from an already existing prometheus endpoint exposed by the pod. It would need the following input:
/metrics
This new feature will bring the following benefits:
ignoredPaths
, and if needed requests can be ignored based on different input: user-agent, source IP, ...I was thinking about adding a new annotation on the deployments:
osiris.deislabs.io/metricsCollector
, using a JSON value - similar to what datadog is doing with https://docs.datadoghq.com/getting_started/integrations/prometheus/?tab=kubernetes :this JSON would have the following schema:
type
: name of the collector implementation. default toosiris
implementation
: a RawJSON that each implementation can use as they see fit.we could also imagine moving the
osiris.deislabs.io/metricsCheckInterval
annotation to acheckInterval
field here - to avoid too many annotations.what do you think ?
The text was updated successfully, but these errors were encountered: