Evaluation of Long-Held HTTP Polling for PHP/MySQL Architecture

David Cutting

Research output: Working paper

Abstract

When a web client needs to periodically refresh data held on
the server there are generally two approaches. Interval polling (“short polling”), which is most commonly used, where the client repeatedly reconnects to the server for updates, and a technique in which the HTTP connection is kept open (“long polling”). Although work exists investigating the possibilities of long polling few if any experiments have been performed using an Apache MySQL PHP (AMP) stack. To determine the potential effectiveness of long polling with this architecture an experiment was designed and conducted to compare update response times using both methods with a variety of polling intervals. Results clearly show a marked improvement in timings with long polling, with the mean response time down to 0.38s compared to a mean of just under the polling interval for short polling. Issues of the complexity and load implications of wide use of long polling are discussed but were outside the remit of this experiment owing to a lack of resources.
Original languageEnglish
Pages9
Publication statusPublished - 2015

Keywords

  • http
  • php
  • mysql
  • long-held polling
  • long poll
  • short poll
  • interval polling

Cite this