Page MenuHomePhabricator

Public EventGate instance and endpoint for analytics event intake: eventgate-analytics-external
Closed, ResolvedPublic15 Estimated Story Points

Description

In Q2-Q4 FY2019-2020, Analytics Engineering will collaborate with Product Infrastructure to develop tooling to use Modern Event Platform components for instrumenting client side features. To do this, they will need a publicly POST-able EventGate endpoint.

The eventgate-analytics service is already handling internal 'analytics' events from Mediawiki server side: mediawiki/cirrussearch-request and mediawiki/api-request. These event streams are relatively high volume.

We will set up a new eventgate-analytics-external instance, exposed at intake-analytics.wikimedia.org, to serve events from external clients.

See also the Event Platform - Produce Usage design document.

  • Name - eventgate-analytics-external, routed externally from intake-analytics.wikimedia.org
  • Description - Validates and produces events to Kafka
  • Timeline - Q3 2019-2020
  • Point person - Andrew Otto
  • Technologies - EventGate

Additionally, T236386: Set up eventgate-logging-external in production is also a separate publicly POST-able instance of EventGate.

Helm & k8s:

LVS, Discovery, frontend routing:

Details

SubjectRepoBranchLines +/-
operations/homer/publicmaster+1 -1
operations/puppetproduction+5 -0
operations/dnsmaster+2 -0
operations/puppetproduction+6 -0
operations/puppetproduction+3 -1
operations/puppetproduction+1 -1
operations/puppetproduction+1 -1
operations/puppetproduction+1 -1
operations/puppetproduction+42 -1
operations/dnsmaster+6 -0
operations/puppetproduction+2 -0
operations/mediawiki-configmaster+8 -0
operations/deployment-chartsmaster+3 -3
operations/deployment-chartsmaster+3 -3
operations/deployment-chartsmaster+12 -8
eventgate-wikimediamaster+18 -4
operations/deployment-chartsmaster+3 -3
operations/deployment-chartsmaster+66 -45
operations/puppetproduction+14 -0
operations/deployment-chartsmaster+597 -159
operations/dnsmaster+3 -0
Show related patches Customize query in gerrit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Ottomata triaged this task as Medium priority.

I'm inclined to just use the existent eventgate-analytics backend endpoint for now. We can consider setting up another eventgate instance for public analytics events later if necessary.

We need to figure out if this endpoint should be exposed at a single domain, e.g. events-analytics.wikimedia.org, or if it should somehow be reachable from each wiki domain, e.g. en.wikipedia.org/beacon/event-analytics. Whatever we choose, the endpoint will need to be POSTable by both mediawiki client side JS as well as remote apps. I don't have a preference, so I leave that decision up to the traffic engineers. Ping @ema and @BBlack.

I'm inclined to just use the existent eventgate-analytics backend endpoint for now.

Recent discussions about message size limits have made me change my mind on this. We'd like to limit both the external POST body size and the size of client event messages a bit more strictly than internal services. The easiest way to do this would be with another eventgate endpoint with different limit configs.

Perhaps a new eventgate instance called eventgate-analytics-external? BTW, this is closely related to the client side error logging project. It too will have a publicly reachable eventgate instance (eventgate-logging-external?) with similar message size limits.

Change 556411 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/dns@master] Add intake-{logging,analytics}.wikimedia.org

https://gerrit.wikimedia.org/r/556411

Change 556411 merged by Ottomata:
[operations/dns@master] Add intake-{logging,analytics}.wikimedia.org

https://gerrit.wikimedia.org/r/556411

Ottomata set the point value for this task to 8.
Ottomata renamed this task from Public EventGate endpoint for analytics event intake to Public EventGate instance and endpoint for analytics event intake: eventgate-analytics-external.Jan 9 2020, 4:39 PM
Ottomata raised the priority of this task from Medium to High.

Change 563211 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/deployment-charts@master] [WIP] New eventgate-analytics-external instance using remote EventStreamConfig API

https://gerrit.wikimedia.org/r/563211

Change 572979 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/mediawiki-config@master] EventStreamConfig - allow eventgate to produce error events

https://gerrit.wikimedia.org/r/572979

Change 573362 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/dns@master] Add eventgate-analytics-external.svc entries

https://gerrit.wikimedia.org/r/573362

Change 573365 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/puppet@production] Add LVS for eventgate-analytics-external on port 4692

https://gerrit.wikimedia.org/r/573365

Change 573366 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/puppet@production] Add discovery for eventgate-analytics-external

https://gerrit.wikimedia.org/r/573366

Change 573367 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/dns@master] Add discovery for eventgate-analytics-external

https://gerrit.wikimedia.org/r/573367

Change 573369 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/puppet@production] Route intake-analytics.wm.org to eventgate-analytics-external

https://gerrit.wikimedia.org/r/573369

Ottomata updated the task description. (Show Details)
Ottomata changed the point value for this task from 8 to 15.
Ottomata added a project: Analytics-Kanban.
Ottomata moved this task from Next Up to In Progress on the Analytics-Kanban board.

Change 563211 merged by Ottomata:
[operations/deployment-charts@master] New eventgate-analytics-external instance using remote EventStreamConfig API

https://gerrit.wikimedia.org/r/563211

Change 573602 had a related patch set uploaded (by Alexandros Kosiaris; owner: Alexandros Kosiaris):
[operations/puppet@production] eventgate-analytics-external: Add k8s token

https://gerrit.wikimedia.org/r/573602

Change 573624 had a related patch set uploaded (by Alexandros Kosiaris; owner: Alexandros Kosiaris):
[operations/deployment-charts@master] eventgate-analytics-external: Add the namespace and calico rules

https://gerrit.wikimedia.org/r/573624

Change 573602 merged by Alexandros Kosiaris:
[operations/puppet@production] eventgate-analytics-external: Add k8s token

https://gerrit.wikimedia.org/r/573602

Change 573624 merged by Alexandros Kosiaris:
[operations/deployment-charts@master] eventgate-analytics-external: Add the namespace and calico rules

https://gerrit.wikimedia.org/r/573624

@Ottomata, tokens created and being propagaged across the cluster as we speak, kubernetes namespaces created and calico rules applied, give it 30mins just to be sure the tokens are everywhere and you should be able to deploy.

Change 574800 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/deployment-charts@master] eventgate-analytics-external - Use proper TLS Kafka port

https://gerrit.wikimedia.org/r/574800

Change 574800 merged by Ottomata:
[operations/deployment-charts@master] eventgate-analytics-external - Use proper TLS Kafka port

https://gerrit.wikimedia.org/r/574800

Change 574816 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[eventgate-wikimedia@master] Add stream_config_uri_options config

https://gerrit.wikimedia.org/r/574816

Change 574816 merged by Ottomata:
[eventgate-wikimedia@master] Add stream_config_uri_options config

https://gerrit.wikimedia.org/r/574816

Change 574848 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/deployment-charts@master] eventgate-analytics-external - Use api.svc to get stream config

https://gerrit.wikimedia.org/r/574848

Change 574848 merged by Ottomata:
[operations/deployment-charts@master] eventgate-analytics-external - Use api.svc to get stream config

https://gerrit.wikimedia.org/r/574848

Change 574850 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/deployment-charts@master] eventgate-analytics-external - use http://api.svc to get stream config

https://gerrit.wikimedia.org/r/574850

Change 574850 merged by Ottomata:
[operations/deployment-charts@master] eventgate-analytics-external - use http://api.svc to get stream config

https://gerrit.wikimedia.org/r/574850

Change 574851 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/deployment-charts@master] eventgate-analytics-external - remove extra type ? in stream_config_uri

https://gerrit.wikimedia.org/r/574851

Change 574851 merged by Ottomata:
[operations/deployment-charts@master] eventgate-analytics-external - remove extra type ? in stream_config_uri

https://gerrit.wikimedia.org/r/574851

Change 572979 merged by Ottomata:
[operations/mediawiki-config@master] EventStreamConfig - allow eventgate to produce error events

https://gerrit.wikimedia.org/r/572979

Mentioned in SAL (#wikimedia-operations) [2020-03-02T19:35:13Z] <otto@deploy1001> Synchronized wmf-config/InitialiseSettings.php: EventStreamConfig - allow eventgate-analytics-external to produce error events - T233629 (duration: 00m 56s)

Mentioned in SAL (#wikimedia-operations) [2020-03-03T14:13:27Z] <ottomata> beginning procedure to add LVS and discovery for eventgate-analytics-external - T233629

Change 573366 merged by Ottomata:
[operations/puppet@production] Add discovery for eventgate-analytics-external

https://gerrit.wikimedia.org/r/573366

Change 573362 merged by Ottomata:
[operations/dns@master] Add eventgate-analytics-external.svc entries

https://gerrit.wikimedia.org/r/573362

Change 573365 merged by Alexandros Kosiaris:
[operations/puppet@production] Add LVS for eventgate-analytics-external on port 4692

https://gerrit.wikimedia.org/r/573365

Change 576431 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/puppet@production] Add check_eventgate_analyltics_external_cluster

https://gerrit.wikimedia.org/r/576431

Change 576636 had a related patch set uploaded (by Alexandros Kosiaris; owner: Alexandros Kosiaris):
[operations/puppet@production] discovery: Add eventgate-analytics-external to check

https://gerrit.wikimedia.org/r/576636

Change 576637 had a related patch set uploaded (by Alexandros Kosiaris; owner: Alexandros Kosiaris):
[operations/puppet@production] lvs: Switch eventgate-analytics-external to lvs_setup

https://gerrit.wikimedia.org/r/576637

Change 576636 merged by Alexandros Kosiaris:
[operations/puppet@production] discovery: Add eventgate-analytics-external to check

https://gerrit.wikimedia.org/r/576636

Change 576637 merged by Alexandros Kosiaris:
[operations/puppet@production] lvs: Switch eventgate-analytics-external to lvs_setup

https://gerrit.wikimedia.org/r/576637

Change 576646 had a related patch set uploaded (by Alexandros Kosiaris; owner: Alexandros Kosiaris):
[operations/puppet@production] lvs: Switch eventgate-analytics-external to monitoring_setup

https://gerrit.wikimedia.org/r/576646

Change 576647 had a related patch set uploaded (by Alexandros Kosiaris; owner: Alexandros Kosiaris):
[operations/puppet@production] lvs: Switch eventgate-analytics-external to production

https://gerrit.wikimedia.org/r/576647

Change 576646 merged by Alexandros Kosiaris:
[operations/puppet@production] lvs: Switch eventgate-analytics-external to monitoring_setup

https://gerrit.wikimedia.org/r/576646

Change 576647 merged by Alexandros Kosiaris:
[operations/puppet@production] lvs: Switch eventgate-analytics-external to production

https://gerrit.wikimedia.org/r/576647

Change 576873 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/homer/public@master] Remove old eventgate-analytics LVS port from Analyitcs VLAN firewall

https://gerrit.wikimedia.org/r/576873

Change 576431 merged by Ottomata:
[operations/puppet@production] Add check_eventgate_analyltics_external_cluster

https://gerrit.wikimedia.org/r/576431

Change 573367 merged by Ottomata:
[operations/dns@master] Add discovery for eventgate-analytics-external

https://gerrit.wikimedia.org/r/573367

Change 573369 merged by Alexandros Kosiaris:
[operations/puppet@production] Route intake-analytics.wm.org to eventgate-analytics-external

https://gerrit.wikimedia.org/r/573369

Ottomata moved this task from In Progress to Done on the Analytics-Kanban board.

Change 576873 merged by Elukey:
[operations/homer/public@master] Remove old eventgate-analytics LVS port from Analyitcs VLAN firewall

https://gerrit.wikimedia.org/r/576873