I have an action poller in my controller and I want check for a batch process if it is completed or not? I am querrying the Batch process to check if completed. I am not sure if this is async or sync as I am worried about the query limits. Can anyone explain if this is sync or async?
<apex:actionPoller> is just a glorified AJAX-Wrapper, each request is a new transaction with new limits. Quoting the documentation:
Consider carefully the effect of your action method being called repeatedly by an at the interval you specify, especially if it's used on a page that will be widely distributed, or left open for long periods.
I suggest to set the interval to at least 20 or 30sec, because batches are long running and do not need to be checked out that often. For instance in case of a debug session it would eat your remaining debug protocol count faster as you might refresh if you are polling with a high frequency.