Our 2 nodes full sync mode Alwayson cluster has 20 databases which allocated into 4 different AG groups (9, 6, 3, 2). We set backup preference as on 'preferred secondary'. Find out that fn_hadr_backup_is_preferred_replica function takes 10 - 14 seconds to return results for each databases which causing backup to take a long time with HADR_CLUSAPI_CALL wait. It seems no matter which one of 4 backup methods for Alwayson, you needs to relied on fn_hadr_backup_is_preferred_replica to return its backup preference. How to fix this problem since the fn_hadr_backup_is_preferred_replica is a system function which hard to modify.
we use SQL 2016 Enterprise, SP2 on latest CU.