Practical options for both monitoring and scaling microservices

Monitoring tools in today's world are changing. These tools include reactive monitoring, user behavior monitoring, and so on. If the system finds a failure, then there should be a good enough tool that helps in debugging, such as centralized logging, and so on. In this section, we will visit some of the tools that will be handy in monitoring the microservice. We will now talk about some well-known tools provided by cloud providers such as CloudWatch and so on.

  • QBit the Java library. It includes a statistics service, which injects a data into StatsD/CodeHale Metrics. This stats service is referred to as statistics engine. This engine provides the data about a microservice and this helps in monitoring that microservice. QBit allows you to write code which can take action on the data provided by the microservice stats engine. StatsD is a network daemon for aggregating statistics. StatsD has many small clients libs for Java, Python, Ruby, Node, and so on.
  • ELK stands for Elasticsearch, Logstash, and Kibana. Kibana is a visual interface for interacting with large amounts of aggregated log data. Log stash is an open source tool for collecting, parsing, and storing logs for future use. Elasticsearch is a centralized log aggregation and indexing server to index the logs. Kibana's working assumption is that log data analysis is a good way to find problems. Kibana supports multiple log aggregators such as Fluentd, Flume, and so on. The best part of kibana is visualizing query results as graphs and widgets.
  • Dynatrace is an application performance management tool. It provides monitoring and user experience analysis, which helps developers, testers, and operations ensure their applications work fast and reliably. Dynatrace has patented PurePath Technology for their product, which allows you to trace every single transaction from end to end (browser to database). Dynatrace does lots of things, such as automatic dependency analysis, automatic performance baselining, automatic root cause analysis, and so on. They have autodiscovery for containerized application. They have native support for cloud infrastructure and Docker.
  • Sensu does asynchronous checks and handles systems written in Ruby. Some of the features of Sensu are it is basically a server/client architecture (sensu-server, sense-client) on top of RabbitMQ, messaging oriented architecture, great test coverage with continuous integration, designed with modern configuration management systems such as Chef or Puppet in mind, designed for cloud environments, lightweight, and with less than 1200 lines of code. It monitors anything by running a series of checks. Also, Sensu reacts to problems/results by designating handlers. Sensu allows you to reuse monitoring checks and plugins from legacy monitoring tools such as Nagios, Icinga, Zabbix, and many more. It also has a web dashboard providing an overview of the current state of your Sensu infrastructure and the ability to perform actions, such as temporarily silencing alerts.
  • AppDynamics launched a machine-learning powered APM product in June 2015 to monitor, manage, and analyze complex architectures such as microservices. However, it is more than just an APM. From data collection to processing and then deriving knowledge from your data, AppDynamics provides full visibility into exactly how application performance is affecting your business. AppDynamics shows application performance in real time and automatically discovers application topology and interdependencies. Its APM tool also includes distributed tracing, topology visualization, and dynamic tagging. AppDynamics provides a significant amount of detail to solve performance problems using APM tools and an analytics-driven approach. The agents are extremely intelligent and know when to capture important details and when to simply collect the basics, and this is for every transaction.
  • Instana, a monitoring and management platform for web-scale applications, was founded in April 2015. They have an intelligent virtual robot assistant, which they call Stan. Instana uses machine learning and mathematical algorithms to provide dynamic graphs and visualizations. Their intelligent robot assistant helps users monitor and optimize complex applications and architectures via immediate notifications.
  • OpsClarity has an intelligent monitoring solution combined with in-depth metrics specific to the architectures of web-scale tools. OpsClarity is written in Scala. For UI, it uses Angular JS and nodes at server side. It also makes use of machine-learning libraries, graphing libraries, and large stream processing infrastructure. The technologies supported include data processing frameworks such as Apache Kafka, Apache Storm, and Apache Spark, as well as data stores such as Elasticsearch, Cassandra, and MongoDB.

Apart from these, there are many monitoring tools, such as Prometheus, Netsil, Nagios, New Relic APM, Foglight, Compuware APM, and many more. Which tool to use in monitoring entirely depends on the system size, organization need, and financial terms.

  • Scaling in microservice architecture is not that easy. Frameworks and toolsets like that of Netflix OSS try to automate the process of registering new microservices as much as possible. If containers such as Dockers, Packer, Serf, and so on come into the picture, things become quite complex, but there are some tools available to scale up the container stuff. Here is a list of those tools:
  • Kubernetes is an open source platform for automating deployment, scaling, and operations of application containers across clusters of hosts, providing container-centric infrastructure. Kubernetes does not let you worry about what specific machine in your datacenter each application runs on.
  • Vamp is an open source, self-hosted platform for managing (micro) service-oriented architectures that rely on container technology. Vamp takes care of route updates, metrics collection, and service discovery, so you can easily orchestrate complex deployment patterns. It is platform agnostic and written in Go, Scala, and React.
  • Mesos is an open source cluster manager which manages workload with dynamic resource allocation. The Mesos process runs on all machines, and one machine is defined as a master, which has the responsibility of managing the cluster. All other machines are slaves that work on a particular task using a set number of resources. It schedules CPU and memory resources across the cluster in much the same way the Linux kernel schedules local resources.
  • Consul is a nice solution for providing powerful and reliable service-discovery capability to your network and much more. It has multiple components, such as service discovery, health checking, key-value store multi data center. Consul is a distributed, highly available system. It helps in the scaling of a configuration server when you have clusters of services. Every node that provides services to Consul runs a Consul agent. The agent is responsible for health, checking the services on the node, as well as the node itself.
  • AWS container service, also known as ECS, is a highly scalable high-performance container manager service that supports many containers, such as Docker. It helps scale your own cluster management infrastructure without much headache. The main components involved in container service are EC2 instance, Docker daemon, and ECS agent. ECS manages Docker containers within AWS, allowing users to easily scale up or down, and evaluate and monitor CPU usage.

There are many more tools, such as the following ones:

  • etcd
  • Deis
  • Spotify Helios
  • Tutum
  • Project Atomic
  • Geard
  • Docker OpenStack
  • Coreos
  • Flynn
  • Tsuru (as it supports docker-cluster)

There are many tools to help scale, with containers or without containers. Frameworks and tool sets like that of Netflix OSS try to automate the process of registering new microservices as much as possible. The intention of this section was only to make you aware of tools in the respective area of microservice. There are lots of resources available on those tools.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset