Alternative to Hangfire in Azure world

Matteo Rigoni 2 Reputation points
2023-07-08T14:28:02.75+00:00

Hi all, i'm using from several time Hangfire and i don't have any problem. Classic use cases that i will have are: 1) From a web app, user enqueue an operation and can check all pending operations. Where operation ends he has a notification via SignalR and can check output of a job. An example is the same Azure Portal, where every operation is enqueued and status is visible in the bell on top right. 2) Recurring job that runs every few seconds to perform scheduled operations indipendent from user's interaction. Jobs must have a lock concept, so until one is running, nothing else of the same type should start for that user. Recently i'm moving to Azure, using k8s for some microservices. I think that i will use a microservice with Hangfire, do you thiks that Hangfire and microservices can coexist? If i don't use Hangfire i have to replicate something similar using Azure Function (high cost), manage a storage for job's state, so will worth it using something different? How do you manage these scenario in microservice architecture? Bye

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,225 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 26,306 Reputation points Microsoft Employee
    2023-07-09T17:02:00.53+00:00

    Hello, @Anonymous !

    What are some Azure alternatives to Hangfire?

    Hangfire describes itself as providing "An easy way to perform background processing in .NET and .NET Core applications." Generally speaking, this overlaps with Azure Functions, which is an event-driven, serverless compute platform that helps you develop more efficiently using the programming language of your choice. Additionally, it sounds like you would want to include Azure SignalR Service which simplifies the process of adding real-time web functionality to applications over HTTP.

    • Azure Functions: Event-driven, serverless compute platform allowing use of a programming language of your choice.
    • App Service/WebJobs: Upload an executable or script allowing you to run background tasks.
    • Azure Service Bus: Fully managed enterprise message broker with message queues and publish-subscribe topics.
    • Azure Batch: Run large-scale parallel and high-performance computing (HPC) batch jobs efficiently.

    The second part of your question is more Hangfire specific than Azure specific so it's outside the scope of what we support here but the Hangfire forums have a thread regarding Hangfire/Microservice architecture:

    https://discuss.hangfire.io/t/using-hangfire-within-a-micro-services-infrastructure-using-database-schemas/3299

    Based on that, it sounds like you might use AKS for your microservices and configure Hangfire to use Azure SQL Server. I hope this helps!

    2 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.