Long time since I wrote a blog post. Just lost in time and work and stuff. I am now back to writing about my learnings in the world of tech. This post is about ads. More specifically about how advertisements are displayed when you visit a website in your browser.

In terms of HTTP requests sent from your browser and the chain of interactions that ensue, below is the flow of control and the various entities involved in this transaction.

  1. User’s browser sends HTTP request to Publisher’s website
  2. Publisher website sends html which also contains a ad snippet
  3. The ad snippet sends out a request to Publisher Ad Server
    • Publisher Ad Server sends an ad if it can
    • Otherwise, it sends a request to the Supply Side Platform
      • The SSP sends a request to a Ad Exchange
        • The Ad Exchange returns a cached bid or an active bid from a Demand Side Platform or another Ad Exchange
      • SSP returns response to the Publisher Ad Server
    • Publisher Ad Server responds with the ad returned by the Ad Exchange
  4. Browser sends a request to the Ad Agency server
  5. Ad Agency server records an Impression and responds with the actual ad!

There are lots of details here and the reason for many of these layers is not clear to me. But at a high level, this is the flow.