-
Notifications
You must be signed in to change notification settings - Fork 384
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
Support for Webhooks #9
Comments
The reason why we have chosen not to go with webhooks (like Nuts, for example) is that they simply don't scale that well: Assuming that you have 10 instances of Hazel up and running, only one instance of those will retrieve the notice that a new release was created over the webhook. In turn, only that single instance will get the new application update. That's why we're polling. 😊 If you want your updates to be delivered faster, you can decrease your interval to 2 minutes or so. |
I feel that is more a problem with how this server is implemented that one inherited from the use of webhooks. If you wanted something more scalable, then you would have a master service which receives the ping and then notifys each of the platform nodes of the update. That being said, i respect what you have chosen, though i do consider it inefficient and perhaps a little evasive in the pursuit to a real solution to a scalability problem. |
Talking about Now's way of scaling deployments, instances are completely separated from each other and therefore not able to determine whether or not other ones exist, where they exist and what their status is. Since I don't think that this will change in the near future and we're basically focused on making it work perfectly on Now first, it doesn't make sense to introduce webhooks. |
I fully understand and appreciate that, i was just stating in general independent of platform. |
Actually we only need to run this when a certain path (let's say The path should only be enabled if the |
@leo indeed you do, i wasn't suggesting this blindly (there was reason behind it) 😄 The biggest reason i suggested it is if enough people started using this with multiple instances, you are basically a DDOS attack waiting to happen (it's happened before), with this, you only ever do something when needed (making it way more efficient). |
That's not completely correct. With the interval mechanism, Hazel respects the limits of GitHub's API and that's far away from a possible DDoS attack (even when scaled to multiple instances). What I just proposed only makes sense when Hazel is running on a single instance, so there won't be many use cases. But still, it's worth implementing. |
@leo Ah, so it does, my apologies. Yes, it's not something everyone will use but it makes your tool more flexible to a wider array of cases. |
Instead of polling on a given interval, it might be more efficient to use webhooks instead so when a release is published, it would send a request to a endpoint which will update it's cache.
https://github.com/:user/:repo/settings/hooks/new
The text was updated successfully, but these errors were encountered: