Application Monitoring with Spring boot Actuator

Monitoring production is an important part of a software service provider. Many companies providing monitoring systems for maintaining the production environment. Spring Boot comes with different awesome modules that developers can easily configure and maintain development and production environments with. The actuator module provides production-ready features by which we can easily maintain the production environment. The actuator exposes JMX and HTTP endpoints.

Features

  • Endpoints: Spring Boot Actuator provides some default endpoints by which we can access application information. We can also monitor the production environment with those endpoints. Endpoints can also be accessed by third-party monitoring tools.
  • Metrics: We can access OS and JVM related information using spring boot actuator endpoints. This is very useful for runtime environment. Spring boot actuator provides this feature by integrating with micrometer application monitoring.
  • Audit: Spring Boot Actuator publishes events to  AuditEventRepository. Spring security by default publishes “authentication success,” “failure,” and “access denied” exceptions. This is a very useful feature for reporting and authentication failures. Auditing can be enabled by AuditEventRepository. By default, spring-boot provides InMemoryAuditEventRepository for auditing which has limited capabilities.
  • HTTP Tracing: Spring boot actuator also provides an HTTP tracing facility. If you want to use it you have to include web endpoint. Http tracing provides the information about request-response exchange.

Important Endpoints

Spring Boot Actuator provides the listed HTTP and JMX endpoint. We will discuss in detail later part of this article.

Docker With Spring Boot and MySQL: Docker Swarm Part 3

Docker Swarm mode

In my previous two articles, I wrote about docker basic and docker-compose where we deployed real applications to a Docker container with Docker CLI and docker-compose. In the first article, we used Dockerfile to set up our environment and deployed the application by running containers separately and then built a link between each of them.

In the second article, we ran multiple containers with the docker-compose tool. But for scaling and high-availability, we need to run our application on multiple host machines with cluster facilities. For orchestrating distributed systems at any scale to gain scalability and high availability, Docker has its own implementation called Swarm. Swarm uses the SwarmKit library for orchestration.  

Docker With Spring Boot and MySQL: Docker Compose (Part 2)

docker-compose helps manage multiple containers

In my previous article, I wrote about Docker, the CLI commands needed to run a database, and Spring Boot applications. We used Dockerfile to set up the environment and run the application by running containers separately and then building a link between them. But for multiple container applications we can use the docker-compose tool. Docker CLI can manage a single container, but docker-compose can manage multiple containers and define the dependent services. 

Docker With Spring Boot and MySQL: Introduction (Part 1)

Docker Architecture

Docker is a technology where developers or DevOps teams can build, deploy, and manage applications by using containers. Docker is an open source software so that everyone can run this on their own operating system, which should support virtualization and Docker for Mac/Windows/Linux.

Docker also ships the ready images from one computer to another. Docker containers are sets of processes that are isolated from the rest of the processes in the host OS. Docker shares the kernel of the host operating system. On the other hand, VM is a technology that depends on the guest OS, which is completely separated from the host OS. Virtual machines communicate with the host OS through hypervisor. VM requires many hardware resources and processes. It's not a container-based technology.

Cryptography With the DES Algorithm

Nowadays, information security is the main concern on the Internet. With web data continuously flowing from one end to another, to ensure data security, there are many procedures that must be implemented. Different organizations are working to find a more secure way to protect data.

There are also some key terms when it comes to information security — like confidentiality, integrity, availability, etc. Confidentiality means that only authorized users can gain access to sensitive data. Integrity confirms that data has not been modified by any mid-level person. Additionally, this means that the data reached the other user without changes or a breach. Lastly, availability means that data is available for any authorized user. There are many procedures that confirm data confidentiality, integrity, and availability. Almost all procedures use some type of encryption/decryption algorithm to keep data secure from middle attacks. And there are two kinds of security algorithms: symmetric algorithms (use the same secret key to encrypt/decrypt data) and asymmetric algorithms (use different secret keys to encrypt/decrypt data). The main goal of this article is to describe DES algorithm and how it secures data. 

Hibernate Envers: Simple Implementations (Part 1)

Introduction

Auditing is an important part of software applications. Almost every business domain requires an audit log to manage the changes of acquired data. More than that, auditing is also required to keep applications safe from fraudulent and unethical access. Many applications also check the changelog of data for their internal processes. Many Java-based software implement triggers on the database layer for auditing, but Hibernate gives a more convenient way to implement auditing.

Hibernate Envers: Features

Hibernate Envers is a framework for auditing. Though Hibernate is an ORM technology, auditing tasks based on Hibernate entities means changes on the entity is audited and saved on the database. Auditing of all mappings is defined by the JPA specification. Revision of each entity log is saved by Hibernate Envers. Hibernate Envers gives the way to read historical data log.