In trying to help for T181368.
This requires:
- Varnishkafka patch to log source port
- Webrequest patch to add the new data to hive
In trying to help for T181368.
This requires:
@Ladsgroup we should follow up with Traffic to make sure that ATS-TLS adds the client's source port in one HTTP header, since Varnish (and varnishkafka) are behind it (so the source port will always be the ATS one). ATS-TLS is the new nginx (and soon to be replaced again!)
@ema quick question - is the client src port something that we could pass from ATS-TLS to Varnish frontend? Via HTTP header etc..
envoy may be the next TLS terminator, but the Traffic team will announce the choice once the review is done! :)
Hi! We'd like to add this to the X-Analytics header, if that's ok with everyone. This way we don't have to add a new field. Here's another task that's adding a debug flag this way: T263683, along with a patch for example: https://gerrit.wikimedia.org/r/c/operations/puppet/+/629735
Change 657296 had a related patch set uploaded (by Vgutierrez; owner: Vgutierrez):
[operations/puppet@production] ATS: provide client port information to varnish
Change 657296 merged by Vgutierrez:
[operations/puppet@production] ATS: provide client port information to varnish
Reporting a chat with the Traffic team happened this morning:
Something like:
if (req.http.X-Client-Port) { set resp.http.X-Analytics = resp.http.X-Analytics + ";client_port=" + req.http.X-Client-Port; }
Change 657416 had a related patch set uploaded (by Effie Mouzeli; owner: Effie Mouzeli):
[operations/puppet@production] varnish: include X-Client-Port in X-Analytics
Change 657416 abandoned by Effie Mouzeli:
[operations/puppet@production] varnish: include X-Client-Port in X-Analytics
Reason:
rebase probs
Change 658567 had a related patch set uploaded (by Effie Mouzeli; owner: Effie Mouzeli):
[operations/puppet@production] varnish: include X-Client-Port in X-Analytics
Change 658567 merged by Vgutierrez:
[operations/puppet@production] varnish: include X-Client-Port in X-Analytics
Both changed deployed by Valentin, I checked the client_port field in webrequest_text on Kafka and it works nicely. The debug header needs to be triggered by an external user, if we want to test it we need to ping @jijiki for a quick test :)
Since both new fields are logged into X-Analytics, there shouldn't be any change needed to Hive etc.. IIUC, but probably only a change in Druid's webrequest_128 to have X-Analytics' fields logged as map?
The pageview definition was changed to react to the debug header, and the change to load webrequest_128 is up for review (both linked to T273083).