Authors- Rajat Malik (Cloud Engineer), Anubhav Bisht (Associate Cloud Engineer)
(If you are not familiar with Spring then check the lower section of the blog for more details)
What is Azure Spring Cloud?
As more and more customers move their workloads to the cloud, there is a tremendous growth in the use of cloud-native architectures, particularly microservices. Microservice-based architectures help improve scalability and velocity but implementing them can pose challenges. For many Java developers, Spring Boot and Spring Cloud have helped address these challenges, providing a robust platform with well-established patterns for developing and operating microservice applications.
The trouble is that creating and maintaining Spring Cloud infrastructure – like a service registry, distributed tracing, and distributed configuration – requires administrative work that few organizations are prepared to take on. Spring Cloud gives you the machinery, but it’s up to you to figure out how you want things secured, scaled, load-balanced, etc.
Azure Spring Cloud is a managed environment built on top of Microsoft Azure with pre-configured, opinionated, ready-to-deploy infrastructure services, and runtime for Spring-based applications.
Azure Spring Cloud makes it easy to deploy Spring Boot–based applications to Azure with zero code changes. Hence, allowing the developers to focus on application code and business logic and the rest will be taken care by Azure Spring Cloud.
Azure Spring Cloud is jointly built, operated, and supported by both Pivotal and Microsoft. This means that you can use Azure Spring Cloud for your most demanding applications and know that both Pivotal and Microsoft are standing behind the service to ensure your success.
High Productivity Development
Azure Spring Cloud abstracts away the complexity of infrastructure management and Spring Cloud middleware management, so you can focus on building your business logic and let Azure take care of dynamic scaling, security patches, compliance standards, and high availability.
With a few clicks, you can provision an Azure Spring Cloud instance. After configuring a couple dependencies in your pom file, your Spring Cloud app is automatically wired up with Spring Cloud Config Server and Service Registry. Furthermore, you can deploy and scale Spring Boot applications in seconds.
To accelerate your development experience, we provide support for the Azure Spring Cloud Maven plugin and VS Code extensions that optimize Spring development. In other words, you can use the tools that you already know and love.
Ease of Monitoring
With a wholesome support for aggregating logs, metrics, and distributed app traces into Azure Monitor, you can easily visualize how your applications are performing, detect and diagnose issues across microservice applications and their dependencies, drill into monitoring data for troubleshooting and gain better understanding of what end-users do with your apps.
Open Source Innovation with Spring Integrations
Azure Spring Cloud sets up the compute foundation for cloud-native Spring applications. From there, Azure Spring Cloud makes it simple to connect to data services such as Azure SQL Database, MySQL, PostgreSQL, or Cosmos DB to enable enterprise grade end-user authentication and authorization using Azure Active Directory, to bind cloud streams with Service Bus or Event Hubs, and to load and manage secrets with Azure Key Vault.
- Central US
- East US
- East US 2
- South Central US
- West US 2
- UK South
You can select the tier based on the configuration you require. Below is a comparison chart between the two tiers i.e. Basic Tier and Standard Tier:
Basic tier is suitable for maximum 25 App instances (with upto 1GB per app, up to 10 apps), whereas Standard Tier can support a maximum of 500 instances (with 50GB per app, up to 10 apps).
For details on pricing, click here.
Direct deployment from source, rolling updates, Blue-Green deployments and custom domains are some of the key features for which choosing the Standard Tier would be the right choice.
What is Spring?
Spring Framework is a powerful lightweight application development framework used for Enterprise Java (JEE).
The core features of the Spring Framework can be used in developing any Java application. It can be described as a complete and modular framework. The Spring Framework can be used for all layers of a real time application. It can also be used for the development of a particular layer of a real time application.
Spring is seen as an alternative or replacement for EJB, a part of the JEE API for encapsulating business logic. There are also many Spring projects available allowing a focus on the integrating of applications, up scaling business logic to developers in either non-web or web applications.
Spring works with JavaBeans, JEE, JDBC and ORM, and can be used to create stand-alone applications or applications made up of components or micro-services.
More information can be found at spring.io but some of the principal concepts of Spring are:
- Inversion of control (IoC): A design pattern which binds object coupling at run-time, not compile-time, i.e. if service A in an application depends upon service B, this dependency is satisfied when the application runs, instead of service A instantiating service B at compile-time.
- Dependency injection (DI): IoC is frequently implemented by DI where dependencies are injected into the client object depending upon them, and which are made part of its state. Spring uses DI to remove dependencies between objects to achieve loose coupling.
- Aspect oriented programming (AOP): This is to do with cross cutting concerns of an application which are distinct from business logic, e.g. logging or security.
- Data access and transaction management: Data access tools simplify data extraction and persistence to relational databases via JDBC or ORM frameworks.
- Messaging: A publish-subscribe pattern is used for messages exchanged between software components.
- Model-View-Controller (MVC): Simplifies the use of HTML requests and responses.
If you want a to try out a step by step build and deployment of a basic app on Azure Spring Cloud, click here.