As the popularity of cloud-based solutions for business applications is growing, the trend of microservice application development in cloud infrastructure has also increased over time. The microservice architecture for application offers numerous benefits: speed, scalability, flexibility, productivity and reliability. But it also raises the critical problem of application error traceability for microservices. Every service outage in microservice applications cost time, money and trust. It is important to monitor and analyze the deployed application to take preemptive actions to increase usability, reliability and availability of the application. A good application monitoring and analysis also reveals interesting business insights.
SAP Cloud Foundry comes with out-of-the-box open source ELK stack (Elasticsearch, Logstash and Kibana) solution for application monitoring and logs analysis. The ELK stack comes with intuitive dashboards for application development teams and business users to give details about application performance, infrastructure utilization patterns, user actions patterns, routing history etc.
Flexibility as a prerequisite for success
Every organization is striving to make its presence in the digital business economy. To be successful today's digital solutions must be agile, flexible and connected to end-to-end processes of the organization and beyond. SAP Cloud Foundry based solutions help the business to save development time and expenses, increase flexibility and avoid vendor locking. Having a unified business cloud platform is critical to delivering state-of-the-art solutions in a constantly changing market.
To take full advantage of the flexibility and availability offered by the cloud platform, businesses are adopting the microservices architecture. In simple terms, microservice-based solutions break a big application into smaller, independent applications. This breakdown gives the advantage of the parallel development of applications and allows replication of the important services to give maximum service throughput. The microservice-based application deployed in the cloud is flexible to serve any amount of service requests by users dynamically. The SAP Cloud Foundry ensures the horizontal scale-up for the microservices deployed in it.
Splitting into several services
The microservice architecture offers many great benefits like the ability to use different technology stacks, to deploy independently or to solve small problems one at a time. An application in a microservice architecture is composed of multiple services communicating with each other via HTTP protocol (e.g. REST or SOA). A service is a unique and isolated application that is the breakdown of a big problem and runs independently. Microservices provide developer teams with exactly what they need in the digitized and disruptive business world: speed, scalability, flexibility, productivity and reliability of applications.
Image 1: Monolithic architecture vs. microservice architecture (Source: Martin Fowler)
A microservice architecture also brings its challenges. While smaller code blocks are easier to understand and manage for developers, the applications themselves are made up of many more components – and these components have more connections. These dependencies increase the overall complexity of the application, which can lead to problems.
Microservices come with the problem of traceability or observability. It is hard to trace how and when a service fails. The deployment of microservice-based applications often contains replications of service instances. Once a service instance failed it is hard to find which, when and why because the application can still run on the redundant service instance. The following questions can only be answered with proper logging in code and log analysis applications:
-
Which service failed?
-
Why did it fail?
-
Under what circumstances did it fail?
Wanted: meaningful analyses
The challenge for the development team is to master this problem through continuous monitoring with meaningful analysis. This analysis shows the development teams where problems exist or processes can be improved. Every failure of service costs time, money and sometimes customer confidence. Therefore, it makes sense to invest in the speed, flexibility and reliability of microservice architectures and their stringent maintenance.
Good application monitoring also gives businesses to know their digital assets better, for example users’ action patterns, application navigation history, most used features and many other KPIs for the application. Proper monitoring of application reveals interesting facts for the business operation team to enhance their services and increase user satisfaction.
A three-letter solution
The SAP Cloud Foundry development environment includes the open source ELK Stack (Elasticsearch, Logstash and Kibana) solution for application monitoring and log analysis. Intuitive dashboards provide details on performance, workload, user actions, routing history, etc. The ELK Stack simplifies decision making and performance analysis for development teams and business customers.
Image 2: the ELK stack
The three elements at a glance:
-
Elasticsearch: The distributed JSON-based search and analysis engine is designed for horizontal scalability, maximum reliability and easy management. Data can be instantly stored, searched, and analyzed.
-
Logstash: The server-side open source software simultaneously processes data streams from different sources, then converts the data and forwards it to any "repository".
-
Kibana: The extensible user interface configures and manages all aspects of the elastic stack and shapes the data.
Read more about the ELK stack here.