Spring Cloud Concepts
Spring Cloud is a collection of tools that wraps a number of open source projects, simplifying the setup and configuration of micro-services projects. It provides solutions to the most commonly encountered patterns into the Spring application.
This allows the developer to focus on writing code.
For logging, the ELK Stack is the acronym for the following three open source projects:
Elasticsearch (https://www.elastic.co) A search and analytics engine.
Logstash (https://www.elastic.co/products/logstash) A server-side data processing pipeline that consumes data and then transforms it in order to send it to a “stash”.
Kibana (https://www.elastic.co/products/kibana) A client UI that allows the user to query and visualise the data of the whole stack.
Cloud Micro-Services
There are several levels of cloud applications. Here we focus on just the main two types of cloud applications.
Cloud Ready
A cloud ready application is an application that was once used on an onsite server. With the availability of the cloud, these types of applications have moved from a static to dynamic environments, with the aim of running in the cloud.
In order to make an on-premise application cloud ready, we need to externalize the applications configuration so that it can adapt to different deployment environments.
Cloud Native
A cloud native application is designed specifically for a cloud computing architecture, taking advantage of all of the cloud’s benefits and services.
When creating this type of application, the architect divides the functions into microservices with scalable components like containers, enabling them to run multiple instances concurrently. These services are then managed by virtual infrastructures through DevOps processes with continuous delivery workflows.
Spring Actuator
Maven Dependency
The Spring Boot Actuator provides out of the box operational endpoints providing visibility on the health of your application instance. To use Spring Actuator, you need to include the following dependencies in your Maven build file:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
Out of Box Health Info
application.properties entries
management.endpoints.web.base-path=/
management.endpoints.enabled-by-default=false
management.endpoint.health.enabled=true
management.endpoint.health.show-details=always
management.health.db.enabled=false
management.health.diskspace.enabled=true