-
Notifications
You must be signed in to change notification settings - Fork 406
Multi bidder Interface
The MultiBidderInterface
can be used to multiplex a number N of BidderInterfaces. For example, you might want to configure an upstream stack to use both Bidding Agents as found in RTBkit 0.9 and another bid system exposing the new HTTP interface.
That way, for a given stream of BidRequests, some would be sent to the agents through the AgentsBidderInterface
(over zeromq) and to an external Bid Optimization System through the HttpBidderInterface
(over HTTP). Any combination of AgentsBidderInterface
and/or HttpBidderInterface
targets is supported.
The MultiBidderInterface
has its own configuration file, usually called bidder-config.json
. Below is an example of such a configuration file:
{
"type": "multi",
"interfaces": [
{
"iface.agents": { "type": "agents" }
},
{
"iface.http": {
"type": "http",
"router": {
"host": "http://downstream-host:8950",
"path": "/auctions"
},
"adserver": {
"host": "http://downstream-host",
"winPort": 18143,
"eventPort": 18144
}
}
}
]
}
Every BiddingInterface
that the MultiBidderInterface
owns must be identified by an unique name. Here, we configured the MultiBidderInterface
to use two interfaces:
iface.agents: an AgentsBidderInterface;
iface.http: an HttpBidderInterface.
Each BidderInterface
must also be configured as usual. For example, for the HttpBidderInterface
, you should provide both the endpoints of the router (exchange connector) and the adserver. No specific configuration is needed for the AgentsBidderInterface
.
To be able to use the MultiBidderInterface
, one last thing needs to be done: pushing some configs to the Agent Configuration Service. A new field has been added to the AgentConfig
called bidderInterface
, which is a string used to identify the BidderInterface
that this particular config should use.
Let's suppose for now that you only want to forward your traffic over HTTP to an external Bid Optimization System before booting some agents. To do that, after configuring the MultiBidderInterface
like above, you should push a configuration to the AgentConfigurationService, indicating that you want to use the HttpBidderInterface
for that config.
An easy way to test that is to use a curl command:
curl -H "Accept: application/json" -X POST -d @http_config.json http://127.0.0.1:9986/v1/agents/my_http_config/config
The http_config.json should look like so:
{
"account": ["hello", "world"],
"externalId": 123,
"bidderInterface": "iface.http",
"bidProbability": 1,
"creatives": [
{
"id": 1,
"width": 300,
"height": 250
}
]
# additional filters
}
Note that the bidderInterface
value must match one of the identifier used in the MultiBidderInterface
configuration file.
- Getting Started
- Pull Request Guidelines
- Coding Standards
- Demo Stack
- How to compile static filters test
- RTBkit Binary Package
- Architecture
- Bid Request Lifecycle
- ZooKeeper Nodes
- Load Shedding
- Banker
- Post Auction Loop State Machine
- Post-Auction Loop Sharding
- ZMQ Endpoints