Key Points

  • Prebid Server is a powerful server-side header bidding solution that moves auction management from browsers to cloud servers.
  • It requires significant technical infrastructure, including high-performance servers and load balancers, to handle high-volume auctions efficiently.
  • Prebid Server can manage more demand partners and higher volumes of bid requests than client-side solutions, potentially improving revenue.
  • Proper configuration of timeouts, price granularity, and adapter settings in YAML files is crucial for optimizing Prebid Server's performance.
  • Troubleshooting Prebid Server involves analyzing server logs, monitoring performance metrics, and addressing unique challenges like cookie syncing and server-to-server connections.

Prebid Server takes header bidding to the cloud, offering publishers a robust, server-side solution for managing ad auctions. It's like Prebid.js's tech-savvy sibling – handling bids off-device to boost scalability and streamline performance, especially when juggling a ton of demand partners.

While Prebid Server packs a serious punch in the ad tech world, it's not a plug-and-play solution. It demands technical chops to implement and fine-tune effectively. But don't let that deter you – understanding Prebid Server can sharpen your ad strategy and potentially boost your revenue. 

Let's dive into the nuts and bolts of this powerful tool and see what it can do for publishers like you.

Understanding Server-Side Header Bidding

Before we get into the specifics of Prebid Server, let's set the stage with a quick primer on server-side header bidding. 

In the world of digital advertising, speed and efficiency are king. Server-side header bidding moves the auction process from the user's browser to a remote server, offering several key advantages:

  • Reduced latency on the user's device
  • Ability to handle more demand partners without bogging down page load times
  • Improved user experience due to faster page loads

Additionally, server-side header bidding can make ad requests less visible on the client side, which may help with ad delivery in some cases where client-side requests are blocked. However, this isn't a primary feature and shouldn't be relied upon as a strategy to bypass user preferences.

However, it's not all sunshine and rainbows. Server-side solutions may have slightly lower cookie match rates compared to their client-side counterparts. This can impact targeting accuracy and potentially affect CPMs. 

It's worth noting that hybrid approaches exist, combining both client-side and server-side bidding. While we're focusing on server-side solutions today, keep in mind that the best approach often depends on your specific needs and technical setup.

This offers several advantages for publishers looking to scale their programmatic advertising efforts. 

Here are some of the key features that make Prebid Server attractive for publishers:

  • Server-Side Architecture: Prebid Server moves the entire auction process off the user's device and onto dedicated servers. This shift allows for more complex auction logic and higher volumes of bid requests without impacting page performance.
  • Scalability: By leveraging server resources, Prebid Server can handle a significantly larger number of demand partners than client-side solutions. This makes it ideal for high-traffic publishers or those looking to expand their programmatic partnerships extensively.
  • Reduced Browser Load: With auctions happening server-side, the user's device is freed from processing multiple bid requests. This can potentially lead to faster page loads and may contribute to improved core web vitals scores, especially on mobile devices or in areas with slower internet connections.
  • Centralized Data Management: Prebid Server centralizes user data handling, which can simplify some aspects of compliance with privacy regulations like GDPR and CCPA. This centralized approach can streamline consent management and data protection efforts. However, publishers must still ensure their use of Prebid Server complies with all relevant regulations. 
  • Server-to-Server Connections: Unlike Prebid.js which relies on browser-based connections, Prebid Server establishes direct server-to-server links with demand partners. This can potentially reduce overall latency in the bidding process.
  • Adapter Configuration: In Prebid Server, more than 200 bid adapters are configured and updated on the server rather than in the browser. This centralized management can simplify maintenance, especially for publishers working with numerous demand partners. However, this also adds a layer of complexity – each adapter has unique settings and may interpret standard signals differently, meaning that you need expertise in each adapter you want to use.

While Prebid Server offers powerful capabilities for scaling header bidding, it requires significant technical expertise to implement and optimize effectively. Publishers need to carefully consider their infrastructure requirements, including server capacity and networking capabilities, before adopting this solution

It's important to note that server-side solutions like Prebid Server face unique challenges with cookie syncing and user identification. This can impact match rates and potentially affect bid relevance. 

One potential workaround for this issue is a hybrid setup. By using both Prebid.js (client-side) and Prebid Server (server-side), you can get the best of both worlds: higher match rates for key demand partners through client-side bidding while still benefiting from the scalability and reduced browser load of server-side auctions.

For those looking to harness the power of Prebid Server without the technical overhead, partnering with ad tech experts like Playwire can ensure you reap the full benefits while focusing on creating great content. 

Basic Configuration for Prebid Server

Setting up Prebid Server requires a robust technical foundation. Unlike its browser-based counterpart, this cloud solution demands specific infrastructure and expertise. 

Here are the key prerequisites for implementing Prebid Server effectively:

  • High-Performance Servers: You'll need servers with load balancing capabilities to handle concurrent auctions efficiently.
  • Cloud-Based Solutions: Consider using platforms like AWS, Google Cloud, or Azure for scalability and reliability.
  • Programming Expertise: Proficiency in Go, the primary language of Prebid Server, is essential. Additionally, knowledge of JavaScript is important for any client-side components and integration.
  • Networking Knowledge: A deep understanding of HTTP/HTTPS protocols and API design is crucial for managing bid requests and responses.
  • Experience with Server-to-Server Communication: Familiarity with how server-to-server connections work will help in integrating with demand partners.
  • Data Management Systems: Experience with database systems like PostgreSQL is necessary for configuration and logging purposes.
  • Caching Mechanisms: Knowledge of caching systems such as Redis can help boost performance by temporarily storing frequently accessed data.
  • Security Expertise: Implementing SSL/TLS for secure data transfer and understanding data encryption practices are vital to protect sensitive bidding information.

While these technical requirements might seem daunting, they're what enable Prebid Server to handle complex, high-volume auctions with impressive efficiency. If you're not equipped to manage these aspects in-house, partnering with Playwire can help you leverage Prebid Server's power without the technical overhead.

Header Bidding Pillar

Read Now: The Complete Guide to Header Bidding

A Step-By-Step Guide to Prebid Server Configuration

Now that we understand the basic requirements, let’s dive deeper into how to configure Prebid Server effectively. This involves setting up your server environment, defining auction parameters, and integrating with your existing ad tech stack.

  1. Server Configuration: Prebid Server uses configuration files written in YAML format to define its settings. Here's an example of a basic configuration file:

 

host: 0.0.0.0

port: 8000

admin_port: 6060

gdpr:

  host: https://gdpr-service.example.com

  usersync_if_ambiguous: true

ccpa:

  enforce: true

 

This configuration sets basic server parameters, including GDPR and CCPA compliance settings. You'll need to customize these settings based on your specific requirements and regulatory needs.

  1. Bid Request Structure: Prebid Server processes bid requests in a standardized format. Here’s an example of a basic bid request structure:

 

{

  "id": "some-request-id",

  "imp": [

{

   "id": "some-impression-id",

   "banner": {

     "format": [

       { "w": 300, "h": 250 }

     ]

   }

}

  ],

  "site": {

"page": "https://example.com"

  },

  "device": {

"ua": "Mozilla/5.0",

"ip": "192.168.1.1"

  }

}

This JSON structure defines the ad impression details, site information, and device data that will be sent to demand partners during the auction process.

  1. Adapter Configuration: Each demand partner requires specific adapter configurations within Prebid Server. Here’s an example of how you might configure a bidder adapter:

 

adapters:

  rubicon:

    endpoint: http://exporter-us-east.rubiconproject.com/hb

    usersync_url: https://pixel.rubiconproject.com/exchange/sync.php?p=prebid

    xapi:

      username: foo

      password: bar

 

 

This configuration sets up the Rubicon adapter with its endpoint and user sync URL. You'll need similar configurations for each demand partner you work with.

By understanding these foundational elements of Prebid Server configuration, you'll be well-equipped to set up your server environment effectively and integrate it into your existing ad tech stack. 

Prebid Server Architecture and Implementation

Prebid Server is designed to handle the demands of real-time programmatic advertising at scale. Its server-side approach introduces unique components and processes that work together to manage high-volume auctions efficiently. 

Let's dive deeper into the components that make Prebid Server tick and how they work together.

Server-Side Infrastructure

Prebid Server's infrastructure is built to manage high-volume, real-time bidding requests efficiently. 

Here are the key components:

  • Application Servers: These handle incoming bid requests and manage auctions. Depending on your traffic volume, you may need multiple instances running concurrently to ensure smooth operation.
  • Database Servers: Used for storing configuration data (e.g., bidder settings) and logging auction activity. PostgreSQL is a common choice due to its reliability and performance in handling structured data.
  • Load Balancers: Essential for distributing traffic across multiple server instances. Load balancers ensure high availability and prevent any single server from becoming overwhelmed.
  • Caching Layer: Systems like Redis can be used to store frequently accessed data (e.g., user IDs or bidder responses) temporarily, reducing the load on your database and speeding up auction processing.

While the specific infrastructure setup depends on your deployment environment, Prebid Server itself is configured using a YAML file. 

Here's an example of how you might configure some key aspects of Prebid Server:

 

host: 0.0.0.0

port: 8000

admin_port: 6060

 

datacache:

  type: postgres

  filename: "postgres://username:password@localhost/prebid_cache"

  cache_size: 10000

  ttl_seconds: 3600

 

cache:

  scheme: http

  host: "localhost"

  query: "/cache"

 

metrics:

  influxdb:

    host: "http://localhost:8086"

    database: "prebid"

    username: "prebid"

    password: "password"

 

adapters:

  rubicon:

    endpoint: "http://exporter-us-east.rubiconproject.com/hb"

    usersync_url: "https://pixel.rubiconproject.com/exchange/sync.php?p=prebid"

    xapi:

      username: "rubiconuser"

      password: "rubiconpassword"

This configuration sets up basic server parameters, database caching, metrics collection, and a sample bidder adapter. Remember to adjust these settings based on your specific requirements and environment. 

Integration with Existing Ad Tech Stack

Prebid Server needs to integrate seamlessly into your existing ad tech ecosystem. Here’s how it fits:

  • Direct Connections with SSPs/DSPs: Prebid Server communicates directly with demand partners using server-to-server connections that adhere to OpenRTB standards.
  • Ad Server Integration: Your ad server (e.g., Google Ad Manager) must be configured to handle responses from Prebid Server. This typically involves setting up line items or key-value pairs that correspond to bids returned by Prebid Server.
  • Client-Side Component: While most processing occurs server-side, you'll still need a lightweight client-side script to facilitate communication between the user's browser and Prebid Server.

Here's an example of how you might configure the client-side component:

var pbjs = pbjs || {};

pbjs.que = pbjs.que || [];

pbjs.que.push(function() {

    pbjs.setConfig({

        s2sConfig: {

            accountId: 'your-prebid-server-account-id',

            bidders: ['bidder1', 'bidder2'],

            adapter: 'prebidServer',

            endpoint: 'https://your-prebid-server.com/openrtb2/auction'

        }

    });

});

 

This JavaScript snippet is typically included in your website's header or ad initialization script. It's a basic template that you'd need to customize with your specific Prebid Server account details and desired bidders. The accountIdbidders, and endpoint values would need to be replaced with your actual Prebid Server configuration details.

  • Bid Request Structure: Prebid Server receives bid requests in the OpenRTB JSON format we discussed earlier. It then enhances these requests with additional data before sending them to demand partners. Prebid Server might enrich the requests with user syncing information to improve match rates, first-party data for better targeting, and deal IDs for private marketplace transactions.

Here's a simplified example of how Prebid Server might add to the original bid request:

{

  "id": "request-id",

  "imp": [

{

   "id": "imp-id",

   "banner": {

     "format": [

       {

         "w": 300,

         "h": 250

       }

     ]

   }

}

  ],

  "site": {

"page": "https://example.com"

  },

  "device": {

"ua": "Mozilla/5.0",

"ip": "192.168.1.1"

  },

  "user": {

"buyeruid": "12345-prebid-server-user-id"

  },

  "ext": {

"prebid": {

   "data": {

     "custom_segment": "high_value_user"

   }

},

"deals": [

   "deal-id-123",

   "deal-id-456"

]

  }

}

This enhanced JSON structure includes the original bid request details (ad impression, site information, and device data) along with additional data added by Prebid Server. The 'user' object now contains a buyer-specific user ID, while the 'ext' object includes custom data and deal IDs. These enrichments can improve bid relevance and potentially increase bid values. 

Remember, this example is meant to illustrate concepts rather than be an exact implementation. The specific enhancements made by Prebid Server can vary based on your configuration and the data available. Always check with ad tech experts or refer to official documentation for production-ready configurations and best practices.

Prebid Server Performance Optimization

Optimizing Prebid Server is essential for maximizing ad revenue while ensuring a smooth user experience. 

Here are some key areas to focus on:

  • Timeout Settings: Properly managing timeout settings is crucial for balancing bid competition with performance. In Prebid Server, you can configure timeouts in the YAML configuration file:

 

auction:

  timeouts:

    default: 250

    max: 1000

This sets a default timeout of 250ms with a maximum of 1000ms. Adjust these values based on your specific needs and audience characteristics.

  • Managing Demand Partners: Regularly review the performance of demand partners. In Prebid Server, you can configure bidders and their endpoints:

 

adapters:

  rubicon:

    endpoint: http://exporter-us-east.rubiconproject.com/hb

  appnexus:

    endpoint: http://ib.adnxs.com/openrtb2

Monitor server-side logs and metrics to analyze performance. Remove underperforming bidders to improve overall efficiency.

  • Price Granularity Control: Prebid Server allows for advanced price granularity controls. Configure custom price buckets in the YAML file:

 

price_granularity:

  precision: 2

  ranges:

    - min: 0

      max: 5

      increment: 0.05

    - min: 5

      max: 10

      increment: 0.1

    - min: 10

      max: 20

      increment: 0.5

Experiment with different configurations to find the optimal setup for your audience. 

Remember to monitor server performance metrics, such as response times and error rates, to ensure your optimizations are effective.

 

Spelling Bee Solver Case Study

Read the full case study now

Troubleshooting and Debugging Your Prebid Server Implementation

When implementing Prebid Server, you may encounter challenges unique to server-side header bidding. Here are some common issues and tips for troubleshooting:

  1. Server-side Logging: Unlike client-side solutions, debugging Prebid Server requires access to server logs. Ensure your logging is properly configured to capture bid requests, responses, and any errors.
  2. Monitoring Server Performance: Keep an eye on server metrics like CPU usage, memory consumption, and network throughput. High-volume traffic can strain server resources, impacting auction performance.
  3. Debugging Bid Request and Response Flows: Use tools like cURL or Postman to simulate bid requests and analyze responses. This can help identify issues in the communication between Prebid Server and demand partners.
  4. Troubleshooting Server-to-Server Connections: Check for network-related issues that may affect connections with SSPs and DSPs. Ensure firewalls and security settings are correctly configured to allow these connections.
  5. Addressing Cookie Syncing Challenges: Server-side solutions often face lower cookie match rates. Monitor your cookie syncing process and consider implementing strategies to improve match rates, such as using a hybrid client-server approach for key partners.
  6. Latency Analysis: Use tools to measure the time taken for bid requests and responses. Identify and optimize slow-performing demand partners or inefficient server processes.
  7. Configuration Validation: Regularly review your Prebid Server configuration files to ensure all settings are correct, especially after updates or changes to your setup.
  8. Integration Verification: Confirm that your ad server is correctly configured to handle responses from Prebid Server, particularly if you're seeing discrepancies in bid data.

Remember, troubleshooting Prebid Server often requires collaboration between development, operations, and ad ops teams. Regular monitoring and proactive maintenance are key to ensuring optimal performance of your server-side header bidding solution.

Embrace Prebid Server Without the Technical Headache

Prebid Server is a powerful tool for publishers seeking to maximize their ad revenue through server-side header bidding. Its scalability, flexibility, and potential for increased revenue make it an attractive option for many publishers, especially those dealing with high-volume traffic. 

However, the technical complexity and ongoing maintenance required to fully leverage Prebid Server can be challenging.

Playwire can handle the complexities of Prebid Server implementation and management, allowing you to enjoy the advantages of server-side header bidding without the associated technical challenges.

Updated Apply Now