Has anyone implemented APM Server in high availability?

The idea is to deploy 2 APM server(Primary and secondary), one Elastic cluster for output, and the agents will send the events to one of those APM server.

Not sure if i need to put a proxy/load balancer and where?. (traffic from agents or traffic to elastic cluster).

As the APM Agents config file, can be configured to a list of APM Server.

indices on elastic cluster will be duplicated as there are 2 APM Server?

I'm having this doubt as there is a lack of documentation for deploying High Availability.

Any Idea?

Thank you !!!.

In the documentation I have read somewhere that setting up HA for APM server is to setup multiple APM servers and put a load-balancer in front of those.

You could ping the active APM port to see if the node is active as a check to keep that node active behind your load-balancer.

In the documentation I have read somewhere that setting up HA for APM server is to setup multiple APM servers and put a load-balancer in front of those.

Perhaps here: High Availability | APM User Guide [8.11] | Elastic :slight_smile:

@jhun4m welcome to the forum. As Peter says, you can use a regular load balancer in front of multiple APM Servers. Agents can also be configured with a list of servers, and they will failover in case a server becomes inaccessible or unresponsive. The latter approach will not load-balance data over the multiple servers, so it depends on whether you really want active-passive or active-active HA.

Has anyone implemented APM Server in high availability?

Yes, the APM Server that comes as part of Elasticsearch Service will be run in an HA mode when you configure multiple availability zones, and/or multiple instances.

indices on elastic cluster will be duplicated as there are 2 APM Server?

Not as long as you use the default index template configuration in apm-server.yml, and have the same versions of apm-server. (By default the index pattern includes the server version.)

Thanks for your reply, I'll take a look at it.

Thank you for your reply,

I was thinking in a Active-passive HA, for this to work it is necessary to put a load balancer, no option like creating a elasticsearch cluster that can assign a role for each instance.

Using a custom index that is defined in apm-server.yml, e.g. "custom-index-%{[observer.version]}"?

That would be fine. I meant that if you changed it to something that varied across the servers, then it would create separate indices. If each server has the exact same configuration, you would not end up with duplicated indices.

Thank you, i'll try it on lab.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.