Troubleshooting

A team wants a Linux server to start a deployment script as soon as code is merged in a hosted Git repository. A cron job now queries the repository every five minutes, which delays deployments and wastes requests. Which method BEST replaces the polling?

Show the answer

Correct answerB. A webhook sent by the repository to an HTTP endpoint on the server

A webhook pushes an HTTP request to the server the moment the merge event occurs, so no polling is needed. Shortening the cron interval is tempting but still polls, still wastes requests, and still leaves a delay.