We have a kubernetes cluster and each application is running as multiple replicas as in multiple pods. What's the best way to track the Java application from multiple replicas? Is it right to treat each replica as a node if yes, this would be an issue when autoscaling happens as the new replica in upscaling would be assigned a node which is not yet created in AppD console. Or do we have any other option on AppD console to capture separate metrics for both the replicas with or without the same agent.
yes, this is a great usage of the properties -Dappdynamics.agent.reuse.nodeName=true -Dappdynamics.agent.reuse.nodeName.prefix=${HOSTNAME}, because they'll ensure a continuity of metric reporting for a node when the pod changes.
1. No I don't see any downside for this solution, it's a very good one
2. In theory, we'd recommend naming tiers based on the business purpose / service they fulfil.
For example in this picture, a Checkout business transaction:
Splitting the tiers by region, even though they have common business purposes across these regions, would lead to different business transactions for "Checkout" for example, each originating from a regional tier, for example:
. A Checkout transaction (with its own metrics and snapshots) originating from "us-east-1"
. Another Checkout transaction (with its own metrics and snapshots) originating from eu-west-1
etc.
The downsides are that:
1. You wouldn't be able to aggregate automatically the metrics of the business transaction and the tiers across the different regions.
2. This could increase very easily the number of business transactions close to the default limit of 200, which is not recommended.
Here are the best practices around an application organisation in AppDynamics (application name, tiers names, nodes names, etc):
https://docs.appdynamics.com/appd/24.x/latest/en/application-monitoring/overview-of-application-moni...
Here is a great article on how to define business transactions (which is very related to the choice of tiers organisation):
Happy to discuss further over a call!
Thank you @Paula.Semaan for the response.
After some more digging, we went with -Dappdynamics.agent.reuse.nodeName=true -Dappdynamics.agent.reuse.nodeName.prefix=${HOSTNAME}
So, this way we could dynamically register new pods/instances/replicas coming in our Kubernetes cluster and this node would be registered in the AppD console as the pod name as shown below.
So this handled upscaling/downscaling and updating in the console.
1. Do you see any downsides in this as we only wanted to use the Java agent?
2. We have a multi-region deployment of our applications, can you suggest any better organization structure for our apps and nodes in this case? We were thinking of using AppName -> Tier as region ( us-east-1 is one tier, eu-west-1 is another tier, etc ) -> Nodes as Kubernetes pods under that tier/region.
Thank you
yes, this is a great usage of the properties -Dappdynamics.agent.reuse.nodeName=true -Dappdynamics.agent.reuse.nodeName.prefix=${HOSTNAME}, because they'll ensure a continuity of metric reporting for a node when the pod changes.
1. No I don't see any downside for this solution, it's a very good one
2. In theory, we'd recommend naming tiers based on the business purpose / service they fulfil.
For example in this picture, a Checkout business transaction:
Splitting the tiers by region, even though they have common business purposes across these regions, would lead to different business transactions for "Checkout" for example, each originating from a regional tier, for example:
. A Checkout transaction (with its own metrics and snapshots) originating from "us-east-1"
. Another Checkout transaction (with its own metrics and snapshots) originating from eu-west-1
etc.
The downsides are that:
1. You wouldn't be able to aggregate automatically the metrics of the business transaction and the tiers across the different regions.
2. This could increase very easily the number of business transactions close to the default limit of 200, which is not recommended.
Here are the best practices around an application organisation in AppDynamics (application name, tiers names, nodes names, etc):
https://docs.appdynamics.com/appd/24.x/latest/en/application-monitoring/overview-of-application-moni...
Here is a great article on how to define business transactions (which is very related to the choice of tiers organisation):
Happy to discuss further over a call!
Hi Akshay,
yes you are right, each replica would be treated as a node.
We'd recommend deploying the cluster agent and leveraging it to auto-deploy the java agent and instrument your java application:
https://docs.appdynamics.com/appd/24.x/24.2/en/infrastructure-visibility/monitor-kubernetes-with-the...
There are a few steps in the link above related to the tiers and nodes naming and management:
...
Remove any deleted pods from the Tiers & Nodes Controller Dashboard. Then, re-create the cluster-agent-secret
that was created in Install the Cluster Agent to include api-user
:
kubectl -n appdynamics delete secret cluster-agent-secret
kubectl -n appdynamics create secret generic cluster-agent-secret --from-literal=controller-key=<access-key> --from-literal=api-user="<username>@<customer>:<password>"
Set the api-user
value to a local user from the Controller with the Server Monitoring Administrator role. Cluster Agent uses the api-user
to mark the associated node in the Controller as historical on pod deletion.
...
tierNameStrategy
property to one of these values:
Hope this helps, let us know please if you need further information.