Since New Relic Senior Product Manager Victor Soares started out as a software developer 21 years ago, he has seen huge changes in the way software gets built. The shift away from monolithic architectures toward a more service-oriented, microservices-based approach has brought major gains in terms of speed and agility.
“We can scale faster and our engineers can choose the right tool for the job—they’re not forced to use a specific language or framework,” said Victor during his FutureStack presentation, Apps & Hosts, Living Together: Mass Hysteria, or Is It? Taming the Complexity of Microservices.
But along with those gains come significant challenges, particularly in the realm of application performance monitoring (APM). With so many moving parts playing a role in every digital transaction—and every wasted millisecond putting pressure on the all-important user experience—troubleshooting performance issues becomes more complex than ever.
In his talk, Victor demonstrated health map, service maps, and transaction traces—tools included in the New Relic platform designed to ease that troubleshooting burden. He also introduced the audience to an exciting new feature currently in development: distributed tracing with support for the OpenTracing standard.
Connecting dots between apps and infrastructure
Health map, Victor explained, “helps you understand the relationship between applications and the infrastructure in which they’re running.” By displaying real-time performance data for both apps and hosts in a single view, health map “shows us how infrastructure impacts application health—and vice versa.”
Service maps, meanwhile, “helps you understand the application architecture—how things connect.” What’s great about New Relic service maps tool, Victor said, is that you don’t have to configure anything manually. Equally handy is the ability to pull in other elements of the larger system, such as databases, so you can look at query response time and throughput to the database as you monitor overall architecture performance.
Traces, Victor explained, use code-level auto-instrumentation to “show you the relationship between your code, performance, and errors”—a relationship that must be understood in order to optimize user experience.
Finding your critical path with distributed tracing
To take that granular specificity to the next level, New Relic is working on distributed tracing. This is a direct response to the complexity of microservices-based architecture, which requires requests to travel through many different services in order to return the complete page to the user.
“When you look at a distributed trace, you’re seeing all of the different services, datastores, and other entities that were involved in that specific request,” said Victor. “So, you get a really good idea of what’s involved, how long it takes, and what the dependencies and relationships are.”
As a demo, Victor dug into a single trace generated by a mobile app request. The trace showed that 6 services and 398 segments were involved in the request, which took around 5 seconds to complete. To make it easier to see what’s really happening, the distributed tracing preview color-codes by segment type: blue for databases, for example, and green for mobile. It also bundles and collapses all the super-fast segments so the display isn’t cluttered by things that can safely be ignored.
The request in question made a call to an API, which in turn made database calls and then contacted a query router. The router contacted other routers and farmed out work to query workers. “We can see each of those query workers and how those query workers are performing,” Victor explained. “We can see the response time, throughput, CPU, memory, network—everything that’s going on at the application level and the host level, all in one spot.”
In other words, distributed tracing gives you a complete end-to-end picture from the mobile application through all systems involved to service the request. New Relic also applies intelligence to show you a critical path in your troubleshooting. For example, in the example system where there are many query workers running on many different hosts, New Relic highlights where one particular host is the problematic host.
Supporting vendor-neutral instrumentation
Victor also talked about New Relic’s upcoming support for OpenTracing, a vendor-neutral standard for the instrumentation of code. While New Relic’s out-of-the-box instrumentation support is unparalleled, Victor said, support for OpenTracing should reassure New Relic customers that any code instrumented using this standard will be accessible within their usual dashboards and distributed traces.
“We’re really stoked to be a part of this,” he added. “We hope that more open source projects start using it. We hope to help educate the ecosystem so that more folks can benefit from instrumentation that ships with software.”
To learn more about how the New Relic platform is evolving to help you optimize performance in microservices architectures, watch Victor’s complete talk in the video below: