Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axonix: enabled by default #1936

Merged
merged 5 commits into from
Jul 30, 2021

Conversation

cesarfd
Copy link
Contributor

@cesarfd cesarfd commented Jul 23, 2021

Axonix adapter is now live.

  • Adapter is now enabled by default.
  • Endpoint is built using macros.

"type": "string",
"minLength": 1,
"description": "Datacenter zone"
},
Copy link
Contributor

@SyntaxNode SyntaxNode Jul 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curios why you are adding the region to the bidder parameters. The common solution on the server side is to instruct Prebid Server hosts via your bidder docs to set different endpoints in their server regions to ensure the shortest routing path. This is different than the approach used in Prebid.js.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... I am kind of lost with this tbh.

Looking at the EndpointTemplateParams struct and how some other adapters use it I figured out the usual way is to set a template endpoint and fill the macros with whatever variable parts the endpoint might need. Kind of like algorix.

But the values of these macros come from the bidder parameters, right? Should I use a totally different approach?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've simplified how the endpoint is resolved using Host instead of region as it is more flexible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry the delayed response. I've been busy with the large amount of PRs open and with summer holidays.

You have the correct approach for using macros, however macros should not be used in the host for geo regions and the entire host may not be supplied as a bidder parameter. That's an anti-pattern which we as a Prebid Server committee strongly oppose. It's odd to ask the publisher to specify the server address of the bidder, it greatly harms Prebid Server's performance which is based on keep alive connections to bidders, and allowing the publisher to pass the host through opens up PBS to a variety of attacks.

I am aware of some bidders doing this today. We're in talks with them to correct their behavior and we're focused on preventing this design from propagating further.

I recommend using a default endpoint pointing to your company's global load balancer. If you don't have a global load balancer, consider marking the adapter as disabled by default and add instructions in your bidder docs to let hosts know which endpoints to use for their geo regions, or ask them to contact you directly to setup if you don't want to publicly post those endpoints. This is the preferred approach for geo region configurations.

Copy link
Contributor Author

@cesarfd cesarfd Jul 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the explanation, I've changed it so that only the path uses macros.

@SyntaxNode SyntaxNode self-assigned this Jul 23, 2021
Copy link
Contributor

@mansinahar mansinahar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than the nitpick I pointed out.

}
return bidder, nil
}

func (a *adapter) getEndPoint(ext *openrtb_ext.ExtImpAxonix) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: P in getEndPoint doesn't need to be capital. Please consider changing it to a lower-case p

thisURI = "https://openrtb-us-east-1.axonix.com/supply/prebid-server/" + axonixExt.SupplyId
endpoint, err := a.getEndpoint(&axonixExt)
if err != nil {
return nil, errors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the err from this call in the errors slice before returning it:

endpoint, err := a.getEndpoint(&axonixExt)
if err != nil {
	errors = append(errors, err)
	return nil, errors
}

@mansinahar mansinahar merged commit be6c749 into prebid:master Jul 30, 2021
wwwyyy pushed a commit to wwwyyy/prebid-server that referenced this pull request Aug 1, 2021
* 'master' of https://github.com/wwwyyy/prebid-server:
  Axonix: enabled by default (prebid#1936)
  IX: update required site id field to be more flexible (prebid#1934)
  New adapter: Adagio (prebid#1907)
  Smaato: Split multiple media types (prebid#1930)
  Fix CVE-2020-35381 (prebid#1942)
  Tappx: new bidder params (prebid#1931)
  InMobi: adding native support (prebid#1928)
  Admixer: Fix for bid floor issue#1787 (prebid#1872)
jizeyopera pushed a commit to operaads/prebid-server that referenced this pull request Oct 13, 2021
shunj-nb pushed a commit to ParticleMedia/prebid-server that referenced this pull request Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants