Profile picture
Nick Craver @Nick_Craver
, 7 tweets, 2 min read Read on Twitter
This is a good addition to .NET - the Stack Overflow scheduler is based on IHostedService, and we have a lot of other plans for it too.
Some examples of queues we have at Stack:
- The aggregator, which puts stuff in network-level tables for things like reputation in your top bar.
- Account queues, for merging/deleting users and such.
- GDPR request completion
- Elasticsearch indexing
- Related question rebuilds
We've moved them to a common "service" type implementation with shared logging, locking, and status reporting infrastructure. They're currently async/await Task.Delay style node competition services we'll move to IHostedService in the move to #AspNetCore.
When you consider our deployment scenarios, options this enables become very appealing.

Scaling up or out in prod? Separate scheduler instance that does a lot of work.

Running local or Enterprise with a few sites? Just fire up the scheduler IHostedService in-process on startup.
When we built the new Stack Overflow scheduler, it's in 3 projects: SDK lib (a .nupkg, minimal classes needed to interface with it as an API), the IHostedService bits (also a .nupkg), and a very thin #AspNetCore site that runs the middle package on startup. That's all it does.
So now, we can make things that can run elsewhere as a dedicated/beefy service, or do the same work in-process for smaller deployments with simpler infrastructure. Trivially. It's so pluggable.

We love it. Can't wait to finish this move...so many wins in .NET Core.
Been asked a few times: will we open source the scheduler? Yeah, maybe. It's really not specific to us at all. It just supports a multi-tenant infrastructure especially well. It'll probably end up on GitHub a bit later when we have the time and fully vet all the combos here.
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Nick Craver
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member and get exclusive features!

Premium member ($30.00/year)

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!