Voiced by Amazon Polly |
Overview
Understanding the flow of requests across microservices in distributed systems is essential for identifying bottlenecks and optimizing application performance. Jaeger, an open-source tracing system, enables developers to monitor and troubleshoot distributed applications effectively. When deployed on Amazon Elastic Kubernetes Service (EKS), Jaeger provides a scalable and robust tracing solution integrated into a cloud-native ecosystem.
Pioneers in Cloud Consulting & Migration Services
- Reduced infrastructural costs
- Accelerated application deployment
Introduction
Jaeger is an open-source, end-to-end distributed tracing system. It is a Cloud Native Computing Foundation (CNCF) project designed to help with:
- Distributed context propagation: Track requests across multiple services.
- Root cause analysis: Identify bottlenecks and performance issues.
- Service dependency analysis: Visualize dependencies between services.
- Performance optimization: Understand and improve request latencies.
By providing visibility into service interactions and latencies, Jaeger empowers teams to troubleshoot complex distributed systems and enhance reliability and performance.
Prerequisites
- Amazon EKS Cluster: Ensure you have an Amazon EKS cluster up and running.
- kubectl: Installed and configured to access the Amazon EKS cluster. Test the connection by running kubectl get nodes to ensure kubectl can communicate with the cluster.
- Helm: Installed for deploying Jaeger components. Confirm the Helm version with helm version and update if necessary to avoid compatibility issues.
- Application Instrumentation: Ensure your application is instrumented with a tracing library compatible with Jaeger, such as OpenTelemetry SDKs. Confirm that the instrumentation setup is sending spans and traces.
- AWS IAM Roles and Permissions: If you use an AWS IAM role for your Kubernetes service account, ensure it has permissions to create and manage resources, including PersistentVolumes, in your Amazon EKS cluster.
- Storage Class: Confirm that a storage class is available for persistent data storage, especially when using production-grade setups like Elasticsearch or Badger.
- Network Configuration: Validate that no network policies or firewalls block communication between Jaeger components or between your application and Jaeger.
Steps to Deploy Jaeger on Amazon EKS
Step 1: Set Up Namespace
- Create a dedicated namespace for Jaeger to organize its resources.
- kubectl create namespace monitoring
Step 2: Add Helm Repository
- Add the official Jaeger Helm repository.
1 |
helm repo add jaeger-all-in-one https://raw.githubusercontent.com/hansehe/jaeger-all-in-one/master/helm/charts |
Step 3: Install Jaeger
- Deploy Jaeger using Helm. You can choose the all-in-one setup for testing or a production setup with distributed components.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
helm install jaeger-all-in-one jaegertracing/jaeger --namespace monitoring \ --set collector.persistence.enabled=true \ --set storage.type=badger \ --set storage.badger.directoryValue=/data/jaeger/badger \ --set persistence.storageClass=standard \ --set persistence.size=10Gi helm upgrade jaeger-all-in-one jaegertracing/jaeger --namespace monitoring \ --set collector.grpcEnabled=false \ --set collector.httpEnabled=true \ --set agent.reporter.type=http \ --set agent.reporter.endpoint=http://jaeger-all-in-one-collector.monitoring.svc:14268/api/traces |
Step 4: Verify Deployment
- Check that Jaeger components are running:
1 |
Kubectl get po –n monitoring |
Step 5: Expose Jaeger Query Service Using Ingress
- Access the Jaeger UI via an Ingress resource to make it accessible externally:
- Create the Ingress YAML file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: alb.ingress.kubernetes.io/certificate-arn: alb.ingress.kubernetes.io/group.name: monitoring alb.ingress.kubernetes.io/group.order: "10" alb.ingress.kubernetes.io/scheme: internal alb.ingress.kubernetes.io/target-type: ip finalizers: - group.ingress.k8s.aws/monitoring generation: 1 name: jaeger-ingress namespace: monitoring spec: ingressClassName: alb rules: - host: jaeger.domain.com http: paths: - backend: service: name: jaeger-all-in-one-query port: number: 80 path: / pathType: Prefix |
- Apply the Ingress:
1 |
kubectl apply -f jaeger-ingress.yaml |
- Verify the Ingress:
1 |
kubectl get ingress -n monitoring |
Step 6: Instrument Your Applications
To send traces from your application to Jaeger, update your deployment file to configure the tracing settings.
- Update the Application Deployment: Add environment variables or sidecars to route traces to the Jaeger agent or collector.
- Verify Instrumentation: Ensure your application emits traces of the specified Jaeger endpoint. You can test this by generating traffic and observing Jaeger UI traces.
Step 7: Key Guidelines
- Use Distributed Setup for Production: A distributed setup of Jaeger components is preferred for production environments to handle higher traffic and ensure fault tolerance.
- Leverage OpenTelemetry: Use OpenTelemetry SDKs to instrument applications for broader compatibility and easier integration with other observability tools.
- Monitor Jaeger Performance: Continuously monitor the resource utilization of Jaeger components to optimize storage and processing capacity.
- Secure Jaeger Endpoints: Restrict access to Jaeger’s Query and Collector services using network policies and authentication mechanisms.
- Backup Tracing Data: Regularly backup the underlying storage (e.g., Badger or Elasticsearch) to prevent data loss in case of failures.
- Optimize Storage Configuration: Configure your storage backend (e.g., Elasticsearch or Cassandra) with sufficient capacity and scalability for production.
- Establish Retention Policies: Define retention policies for tracing data to balance between storage costs and troubleshooting needs.
Conclusion
By deploying Jaeger, we gain a scalable tracing solution to monitor and optimize your distributed applications.
Drop a query if you have any questions regarding Jaeger and we will get back to you quickly.
Empowering organizations to become ‘data driven’ enterprises with our Cloud experts.
- Reduced infrastructure costs
- Timely data-driven decisions
About CloudThat
CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.
CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training Partner, AWS Migration Partner, AWS Data and Analytics Partner, AWS DevOps Competency Partner, AWS GenAI Competency Partner, Amazon QuickSight Service Delivery Partner, Amazon EKS Service Delivery Partner, AWS Microsoft Workload Partners, Amazon EC2 Service Delivery Partner, Amazon ECS Service Delivery Partner, AWS Glue Service Delivery Partner, Amazon Redshift Service Delivery Partner, AWS Control Tower Service Delivery Partner, AWS WAF Service Delivery Partner, Amazon CloudFront and many more.
To get started, go through our Consultancy page and Managed Services Package, CloudThat’s offerings.
FAQs
1. What storage backends are supported by Jaeger?
ANS: – Jaeger supports multiple storage backends, including Elasticsearch, Cassandra, Kafka, and Badger. For production environments, Elasticsearch and Cassandra are recommended for their scalability.
2. Can Jaeger be used with other tracing tools?
ANS: – Yes, Jaeger is compatible with OpenTelemetry, which allows integration with other tracing tools and observability platforms.
WRITTEN BY Bhupesh .
Bhupesh is working as a Research Associate at CloudThat. He is passionate about learning and gaining industrial experience in cloud computing technologies like AWS and Azure. Bhupesh is also an excellent communicator and collaborator. He also proactively seeks new challenges and opportunities to learn and grow in his role. His passion for learning and exploring new technologies and his technical expertise make him a valuable member of any team working in the field.
Click to Comment