EC2 Nitro networking under the hood (NET402)

Overview of Nitro and Optimizing EC2 Instance Networking

Key Takeaways

  1. Nitro System: Nitro is an umbrella term that covers AWS's networking, storage, and security capabilities offloaded to dedicated hardware chips, allowing for increased instance density and performance.

  2. Packet Analysis:

    • Packets flow through the application, kernel, drivers, and Nitro hardware.
    • Nitro handles routing, access control, and connection tracking for VPC traffic.
    • Nitro uses hashing on the 5-tuple (source/destination IP, protocol, source/destination ports) to assign packets to queues and processors.
  3. Flow Analysis:

    • Single flows can achieve up to 5 Gbps (default), 10 Gbps (cluster placement group), or 25 Gbps (Ena Express).
    • Micro-bursting can occur when packets arrive faster than they can be processed, leading to queue buildup and drops.
    • Techniques to manage micro-bursting include increasing queue depth, using traffic control, and leveraging Ena Express.
  4. Multi-Flow Analysis:

    • Nitro can handle multiple flows by hashing on the 5-tuple and distributing across queues and CPUs.
    • Burst bandwidth, baseline bandwidth, packets per second, and shared Nitro resources need to be considered for multi-flow workloads.
  5. Tuning and Monitoring:

    • Latency can be optimized by using cluster placement groups, DPDK, and CPU C-state management.
    • Queue management techniques like RSS, RPS, and Ena flow steering can distribute traffic across CPUs.
    • Monitoring tools like CloudWatch metrics (bandwidth, PPS, contract usage) can help identify and troubleshoot issues.

Action Plan

  1. Understand your traffic types: Identify if you have any "whale" flows (e.g., GRE, IPsec tunnels) and TCP/UDP flow entropy.
  2. Build a traffic profile: Determine your packets per second, bits per second, and connections per second requirements.
  3. Select the right instance: Match your traffic profile to the instance's baseline and burst specifications, Nitro performance, and number of network interfaces.
  4. Tune and monitor: Optimize driver settings, use eth tool metrics and CloudWatch for detailed monitoring, and leverage VPC-level metrics.

Additional Resources

Your Digital Journey deserves a great story.

Build one with us.

Cookies Icon

These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information to improve and customize your browsing experience, as well as for analytics.

If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference.

Talk to us