Once AP's successfully join a controller the short answer is yes, there is a heartbeat timer every 30 seconds unless a heartbeat is missed then the AP sends 1 heartbeat a second for 5 seconds, if those go unanswered the AP will fail over to another controller. Now the longer part of the story is that APs need to be primed to know which controller is their primary, secondary, and tertiary they should be joined to, and fail over to should it need to do so. If an AP is not primed or hasn't been configured with HA settings, when the AP discovers the first WLC through any of the methods it can Option 43, DNS, static, previous config, or L3 broadcast, when it discovers the first controller if that WLC is part of a Mobility Group, the AP would then learn about all WLC's in the mobility group and would actually join the least loaded WLC. So if WLC1 has 3APs, WLC2 has 2AP's, it would join WLC2. At 2 controllers the AP would just fail over to the other controller in the MG. To avoid issues, you should always ensure all APs are primed, with HA settings, and the fail over process will happen as described above and depending on where the 30sec heartbeat was would take between 6-36sec by default to initiate a fail over. If this is undesirable consider SSO, which offers sub-second fail over. Hopefully this helps, was on a short break.
Sorry forgot your last question. The AP Primed Join Timeout. After an AP discovers controllers to Join and learn about all controllers in the MG as described above. The AP periodically sends Discover messages to each controller to ensure they are a viable option. If a WLC doesn't respond for a number of discover request, they are removed from the list. Again this is why it's best to have APs primed, so they know the fail over routine in advance. Hope this helps!
Thanks for your quick response. I think I've understood most of it but, please, help me to clarify some points.
The AP sends 1 heartbeat a second for 5 seconds at the very first missed heartbeat, doesn't it?
If so, then what is the "AP Primary Discovery Timeout(30-3600)" variable for?
Yes your correct, on the heartbeat so you got that:)
The second part is about the fail over / discovery process when the AP cannot reach a controller, and the fail-over process begins it sends a primary discovery request to another controller in the MG, if the controller responds before the timer expires, life is good and it completes the join, if it doesn't it continues to the next controller in the list. This timer is how long an AP will wait for a response from the discovery message from the controller. For example say you have 3 controllers, the AP looses connectivity to WLC1, WLC2 is next on the list but in the same closet and is unreachable too, WLC 3 is in a different area and available you don't want the AP to wait forever on WLC2 before trying to join WLC3?
Also a quick side note... controllers don't have to be in the same MG for APs to fail-over if you have APs statically primed however if APs are not primed, they only discover controllers in the same MG.
Let me know if this helps, or have more questions.