logo
search
EXPAND ALL
  • Home

Network Monitoring

Network performance can have a big impact on the health of your services. With Pixie, you can easily monitor your network alongside your application and infrastructure layers.

This tutorial will demonstrate how to use Pixie to see:

  • The flow of network traffic within your cluster.
  • The flow of DNS requests within your cluster.
  • TCP drops and TCP retransmits across your cluster.

Prerequisites

  1. You will need a Kubernetes cluster with Pixie installed. If you do not have a cluster, you can create a minikube cluster and install Pixie using one of our install guides.

Network Traffic Across Pods

A global view of the network traffic flowing within a cluster can be used to:

  • Quickly determine which services are communicating.
  • Identify any misconfigured services.
  • Identify load balancing issues.

Let’s use the px/net_flow_graph script to see a graph of all of the network traffic passing through the cluster:

  1. Open the Live UI and select px/net_flow_graph from the script drop-down menu at the top.

When the script opens, you’ll get an error indicating a value is missing for the namespace required argument. The UI denotes required script arguments with an asterisk after the argument name.

  1. Enter pl for the required namespace argument.

Select the drop down arrow next to the namespace argument, type pl, and hit Enter. pl is the namespace that Pixie deploys to.

This script shows a mapping of all the outgoing connections for the pods in the specified namespace.

Click anywhere on the graph to interact: pan, zoom, or rearrange individual nodes.
Hover over an Edge for network transmission stats. Thicker lines indicate more traffic.
Grey hexagonal icons represent pods making network requests.
Blue circles represent remote endpoints. If a request’s remote endpoint is within the cluster, then the IP address is resolved to a pod/service name.

Let's filter the graph to only show communication to the pl-nats pod.

  1. Select the drop down arrow next to the to_entity_filter argument, type pl-nats, and press Enter to re-run the script.

The graph should update to only show network traffic sent to the pl-nats pod. Pixie uses NATS as our messaging system.

  1. Clear the to_entity_filter value by selecting the drop-down arrow and pressing Enter.

  2. Scroll down to the table below the graph. This table contains the same data that is used to construct the graph above.

DNS Requests Across Pods

Another capability Pixie provides is the ability to inspect and analyze DNS traffic. This information can be used to:

  • Quickly determine which services are making DNS requests.
  • Get high-level DNS latency and throughput information.
  • Observe imbalances of throughput between DNS servers.

Let’s use the px/dns_flow_graph script to see a graph of DNS requests in the cluster:

  1. Select px/dns_flow_graph from the script drop-down menu.

This script shows all of the DNS requests made in the cluster, with latency and throughput stats.

This cluster doesn't have anything deployed except Pixie, so all we see are the kube-dns pods communicating with the metadata server.

Enter a string to filter the DNS requests.
Hover over an Edge to see network transmission stats. Thicker lines indicate more traffic.
Click table column titles to sort the column data.
  1. Click on the LATENCY_AVG column title to sort the table data by average latency.

TCP Drops

TCP drops and retransmits can indicate network connectivity issues that may affect application performance.

Let's use the px/tcp_dropsscript to see a global view of TCP drops across the cluster.

  1. Select px/tcp_drops from the script drop-down menu.
  1. Press the "RUN" button in the top right and the script will first deploy a tracepoint (the new data source) and then query the new data source.
Enable Hierarchy View for a different view of the graph.
  1. Hover over an edge to see the number of drops between pod pairs. The color and thickness of the edges indicate an increase in the number of TCP drops.

  2. After a few seconds have passed, press the "RUN" button once again. Since more time has elapsed since the tracepoint was deployed, you should see more data in the graph.

Related Scripts

This tutorial demonstrated three of Pixie's community scripts. For more insight into your network, check out the following scripts:

  • px/dns_data shows the most recent DNS requests in your cluster, including the full request and response bodies.
  • px/tcp_retransmits graphs the TCP retransmission counts across your cluster. Don't forget to click the RUN button.
This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.