Need advice about which tool to choose?Ask the StackShare community!
Azure App Service vs Azure Service Bus: What are the differences?
Introduction
Azure App Service and Azure Service Bus are two popular services provided by Microsoft Azure. While both are used for building and deploying applications, there are key differences between them that make them suitable for different use cases.
Deployment Model: Azure App Service is a Platform as a Service (PaaS) offering that allows developers to easily deploy web, mobile, and API applications without having to manage underlying infrastructure. On the other hand, Azure Service Bus is a cloud messaging service that enables reliable communication between distributed applications. It follows a message-based communication model, where applications can send and receive messages through queues or topics.
Application Hosting: Azure App Service provides a fully managed environment for hosting applications, handling the scalability, availability, and security aspects. It supports multiple programming languages and frameworks, making it suitable for a wide range of applications. Azure Service Bus, on the other hand, focuses on message queuing and publish-subscribe patterns. It provides features like message routing, session handling, and message batching, making it ideal for building decoupled and scalable architectures.
Message Delivery Guarantees: Azure App Service ensures that the applications deployed on it are highly available, with built-in scaling options to handle traffic spikes. It provides automatic scaling, load balancing, and fault tolerance. Azure Service Bus guarantees reliable message delivery, by persisting messages in durable message stores and providing features like duplicate detection, time-to-live, and transactional support. It ensures that messages are delivered even in the presence of failures.
Message Ordering: Azure App Service does not enforce any strict ordering of requests or messages, as it focuses on serving web, mobile, and API applications that typically require high throughput. On the other hand, Azure Service Bus enables strict ordering of messages within a queue or topic. It ensures that messages are processed in the order they are received, making it suitable for scenarios where strict ordering is critical.
Message Size Limit: Azure App Service has a limit on the request and response payload size, typically 100 MB. It is designed for handling web requests and responses, where large payloads are not common. Azure Service Bus, on the other hand, supports larger message sizes, up to 256 KB for standard messaging and 1 MB for premium messaging. This makes it suitable for scenarios where larger payloads need to be sent between applications.
Message Durability: Azure App Service does not provide built-in durability for messages or requests. If a request fails, it needs to be retried by the client. Azure Service Bus ensures message durability by storing messages in reliable storage until they are explicitly consumed by the receiver. This allows for a more robust and fault-tolerant message processing.
In summary, Azure App Service is a PaaS offering for hosting web, mobile, and API applications, while Azure Service Bus is a cloud messaging service for reliable communication between distributed applications. App Service focuses on application hosting and scalability, while Service Bus focuses on message queuing and publish-subscribe patterns. App Service does not enforce strict ordering and has limitations on message size, while Service Bus provides strict ordering and supports larger message sizes. App Service does not provide built-in durability for messages, while Service Bus ensures message durability.
Hello dear developers, our company is starting a new project for a new Web App, and we are currently designing the Architecture (we will be using .NET Core). We want to embark on something new, so we are thinking about migrating from a monolithic perspective to a microservices perspective. We wish to containerize those microservices and make them independent from each other. Is it the best way for microservices to communicate with each other via ESB, or is there a new way of doing this? Maybe complementing with an API Gateway? Can you recommend something else different than the two tools I provided?
We want something good for Cost/Benefit; performance should be high too (but not the primary constraint).
Thank you very much in advance :)
There are many different messaging frameworks available for IPC use. It's not really a question of how "new" the technology is, but what you need it to do. Azure Service Bus can be a great service to use, but it can also take a lot of effort to administrate and maintain that can make it costly to use unless you need the more advanced features it offers for routing, sequencing, delivery, etc. I would recommend checking out this link to get a basic idea of different messaging architectures. These only cover Azure services, but there are many other solutions that use similar architectural models.
https://docs.microsoft.com/en-us/azure/event-grid/compare-messaging-services
Pros of Azure App Service
- .Net Framework6
- Visual studio5
Pros of Azure Service Bus
- Easy Integration with .Net4
- Cloud Native2
- Use while high messaging need1
Sign up to add or upvote prosMake informed product decisions
Cons of Azure App Service
Cons of Azure Service Bus
- Limited features in Basic tier1
- Skills can only be used in Azure - vendor lock-in1
- Lacking in JMS support1
- Observability of messages in the queue is lacking1