2

Everyone interested in web application performance knows about the idea behind Facebook's BigPipe.

Recently, Symfony released a new feature, called the fragments sub-framework.

The idea behing this feature is to use the ESI technology, described to W3C as the ESI Language Specification 1.0.

My question is: is Facebook's BigPipe in any way related to this ESI technology? Can I achieve the BigPipe idea using ESI?

1
  • 1
    Why the downvotes? This is a perfectly valid question, as it sounds on the surface like the same thing—delivering parts of the page at different times, etc. Thanks for asking! Commented Mar 23, 2016 at 21:41

1 Answer 1

4

Probably not without your own ESI server implementation, and even then it's questionable whether it's worth the performance hit.

Assuming I understand that BigPipe article correctly, all the server-side has to do is a) immediately flush some static HTML content to the client and b) asynchronously start a few rendering threads and flush the output whenever a thread has finished rendering. The rest is javascript magic and has nothing to do with the server-side framework.

Symfony is able to render a simple HTML document and include ESI tags therein, so a) is covered. But ESI is dependent on the order in which the tags are encountered. This means that while I suppose most cache servers will start processing all ESI tags asynchronously, they can only flush the output in a specific order. This, in turn, means that if your first ESI tag is slow, it will prevent any other "pagelet" from being flushed to the user.

This is why I believe you'd need a special kind of caching server that can asynchronously fetch includes while completely ignoring where in the document they appear.

The other major drawback is that each ESI tag would cause its own HTTP request to symfony which has a pretty huge setup overhead for each request.

In conclusion: ESI is great if you want to return a cached page that's expensive to generate with a tiny bit of un-cacheable content, but it's probably not a good fit for implementing BigPipe.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.