-
-
Notifications
You must be signed in to change notification settings - Fork 223
docs(self-hosted): revamp self hosted related documentation #1117
docs(self-hosted): revamp self hosted related documentation #1117
Conversation
@aldy505 is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
@@ -2,7 +2,7 @@ | |||
title: 'Self-Hosted Support' | |||
--- | |||
|
|||
We strive to provide a great self-hosted experience for folks willing to try Sentry that way. The [self-hosted repository](https://github.com/getsentry/self-hosted) is geared towards low to medium loads with simplicity in mind. We believe keeping this setup simple is important to show | |||
We strive to provide a great self-hosted experience for folks willing to try Sentry that way. The [self-hosted repository](https://github.com/getsentry/self-hosted) is geared towards low traffic loads (less than ~1 million submitted Sentry events per month). We believe keeping this setup simple is important to show |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, where did you get this number from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Observing my own instance as well as a few of my friends.
I found that if you need to go beyond 1 million events, you'd tweak retention settings or bump the machine resource.
It's very subjective, but I guess that's what the server can handle with the default machine resource.
Hey @hubertdeng123 can you help with the NGINX configuration? I don't really use NGINX, so I don't know what's best for implementing reverse proxy + rate limit + specific endpoint handler + ACME TLS. |
- 16 GB RAM | ||
- 20 GB free disk storage space | ||
|
||
Depending on your load, you might want to increase your system specification to handle higher traffic load better. If increasing the disk storage space isn't possible, you can migrate your storage to use external storage such as AWS S3 or Google Cloud Storage (GCS). Decreasing your `SENTRY_RETENTION_DAYS` environment variable to lower numbers will save some storage space from being full, at the cost of having shorter data retention period. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really wanted to add how they can actually use Kubernetes for scaling out, but that's not officially supported. Is it okay to put it here as "community stuff"?
A few stuff that I want to put here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chadwhitacre what is the company policy on doing this? I would refrain from putting specific links to repos that aren't getsentry
repos if we can help it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we need to draw the line somewhere and this seems like a good place to draw it @hubertdeng123.
Yep, I can go about adding this documentation for this. |
Do you want to do that on a separate PR? I'll finish up here if you do. |
Yes, I'll do this in a follow up PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great start! Loving the details you're putting here.
- 16 GB RAM | ||
- 20 GB free disk storage space | ||
|
||
Depending on your load, you might want to increase your system specification to handle higher traffic load better. If increasing the disk storage space isn't possible, you can migrate your storage to use external storage such as AWS S3 or Google Cloud Storage (GCS). Decreasing your `SENTRY_RETENTION_DAYS` environment variable to lower numbers will save some storage space from being full, at the cost of having shorter data retention period. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chadwhitacre what is the company policy on doing this? I would refrain from putting specific links to repos that aren't getsentry
repos if we can help it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Co-authored-by: Hubert Deng <hubertdeng123@gmail.com>
Thanks for jumping in and doing this @aldy505! This makes me think we need to get clearer about the line between "small volume and proof of concept deploy" which we want to officially support and "high availability deploy" which we do not want to officially support. Docs for the former are great to have on develop.sentry.dev; docs for the latter belong elsewhere, and as @hubertdeng123 suggests, we would want to let people discover those resources on their own (we can be like "go google sentry kubernetes" but not link directly). |
My initial thoughts on this are that we support an architecture with one web/snuba container with data services external to that container. Scaling up web nodes would be out of scope. Does that seem like a good way to slice it? |
I think the "data services external to that container" will cause confusion to some. For me, that'd mean configuring standalone Postgres using AWS RDS, standalone ClickHouse Cloud, and the like, alongside with the configuration of called services is supported officially. Although the fact that it is supported for this kind of deployment, it'd be hard to satisfy everyone's needs. Maybe for simpler terms: We only support this kind of deployment model (docker compose stuff), for scaling up any of Sentry's containers, you'll need to figure it on your own, or find community implementation of it. |
Any chance to take a look at this before the end of the week? @hubertdeng123 @chadwhitacre @azaslavsky |
Hi @aldy505, sorry for the delayed response! So here’s where we’re at: anything we add to the docs comes with some implicit level of support. We’re a small team, and are worried about increasing the scope of self-hosted to be much larger than it currently is, especially when it comes to products/services that we don’t have much experience with and that are not used internally at Sentry (ex: Traefik, Caddy). The purpose of this repository is to be a small, self-contained instance of Sentry, suitable for deployment on a single server. Concerns regarding larger deployments are explicitly left out, since they are more related to generic DevOps and scaling work than to running Sentry as a product. For example: load balancing is a general concern related to any web service as it scales, not to Sentry in particular, and something that users comfortable with self-hosting should generally be able to set up on their own. All that to say: we're talking internally about what our limits are, what we do/don’t want to support, and what kind of explicit commitments we want to make with that support. That is taking a bit of time on our end as we work out those boundaries. We really appreciate you being patient with us, and for the incredible enthusiasm toward improving self-hosted. We’ll have something more concrete for you shortly. |
Hi @azaslavsky, is there any news for this? Or do we need to setup a sync meet to make this faster, because docs for self-hosted is pretty outdated and there's so much repeating problem-debug-solution happening all around Discord and GitHub lately. |
I finally took the time to read through these new docs. In general this looks pretty great, @aldy505, thank you! :) I see opportunities to clean up for style, but I don't think we need to block on style, we can clean that up later. I do think we want some structural changes to the main new "Productionalizing" page:
Also, for future PRs, it will be easier for us to digest and accept smaller PRs rather than one so large as this. :-) |
@chadwhitacre I don't think it's a good idea to combine "network proxy" (number 4) with "reverse proxies" (number 1-3), this will be confusing for future readers. How about we keep the "Installing Behind a Proxy" on the Overview page, and rename "Productionalizing" to "Reverse Proxy"? I think most problems with users that want to self-hosted Sentry is not knowing what to settings put on their outermost reverse proxy/load balancer, like the event ingestion endpoints, what will happen if a rate limiter is placed, and so on forth. There's very minimal documentation for that. |
That works for me. Thanks. |
|
||
By default, Sentry does not handle rate limiting for any incoming request. On hosted version of Sentry (SaaS), it has a feature called [spike protection](https://docs.sentry.io/product/accounts/quotas/spike-protection/) which can protect you from event flood. The code for that module is not available on the public [sentry](https://github.com/getsentry/sentry) repository, it lives on the private getsentry repository instead. | ||
|
||
For self-hosted deployment, it is recommended to have a rate limiter on your dedicated load balancer to prevent such things to happen. It is highly recommended than ever if you expose your Sentry instance publicly to the internet. Some example are available on [Using Dedicated Load Balancer](#using-dedicated-load-balancer) section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#using-dedicated-load-balancer here is now removed, we'll need to update this to get the build passing
Thanks for seeing this through, @aldy505! 😁 |
This is a work in progress, but I'll appreciate any reviews coming in. I need those anyways.
For context, on self-hosted we have this issue (getsentry/self-hosted#2267) that's going nowhere. My goal with this PR Is to add more documentation for resolving common self-hosted related issues.
Here are the things I'll write (or add) about on this PR (you can discuss it on the Discord thread):
If anyone has any ideas or things they think is nice to add here, let me know.