LDAP clustering for LDAP identity provider is not working as expected
search cancel

LDAP clustering for LDAP identity provider is not working as expected

book

Article ID: 201221

calendar_today

Updated On:

Products

CA API Gateway CA API Gateway Precision API Monitoring Module for API Gateway (Layer 7) CA API Gateway Enterprise Service Manager (Layer 7)

Issue/Introduction

Background of issue:

There are 4 ldap servers in the ldap cluster, but when one of the node is down, the gateway has got more than 80% errors, not the expected 25%.

The ldap identity provider is configured 2 ldap urls pointing to the load balancer of the cluster with different ports.

 

Environment

Gateway 10.x 11.x

Cause

The LDAP url is configured to use the hostname of the load balancer of the LDAP cluster.

When the LDAP connection is fail, the gateway will put the LDAP url in the black list for a minute by default, then the whole cluster is not available during that period(not just one node).

Log snippet:

  {"package":"com.l7tech.server.identity.ldap.LdapUrlProviderImpl","level":"INFO","log":{"service":"Login" message":"Blacklisting url for next 60 seconds.....}

For multiple LDAP urls, the gateway will try to use the first available LDAP url, and keep using it until it fails, then put it in black list and try next LDAP url.

Resolution

The best solution is, the load balancer should be properly configured and only route the requests to the available nodes in the cluster.

On the Gateway side two options:

  1. Clusterwide property, this will effect all Identity Providers:  ldap.reconnect.timeout = 60000 (default) change to zero
  2. Override the default just for the failing identity provider in the properties of the LDAP provider  "Reconnect Timeout" on the ldap wizard

 

Additional Information