From left to right on the image:
The webpage has ad placements known as Ad Entities. These entities appear as simple div elements with a data-entity-id attribute that includes the Ad Entity ID within the RapidPrebidServer.
Once the page has loaded and the DOM is ready, the ad-provider.js script searches for all the ad placements present on the page and gathers their respective IDs into a singular array. After this step, the script sends an HTTP POST request with the collected IDs of ad objects to the RapidPrebidServer.
The RapidPrebidServer receives a request from ad-provider.js and creates an OpenRTB BidRequest object with Imp objects for each ad from the request. It then sends this request to all connected DSPs simultaneously via the OpenRTB protocol. After receiving all OpenRTB BidResponses, the server conducts an auction for each Ad Entity. The winning creatives are sent back to ad-provider.js, which then displays them on the page.
To optimize page load times, we use a single JS script and HTTP request to RapidPrebidServer to serve all ad places on the page. This is in contrast to the classic method of using a separate JS script and request for each ad place.