You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Wikifeeds

From Wikitech-static
Revision as of 15:40, 30 September 2019 by imported>Mholloway (add contacts)
Jump to navigation Jump to search

This page provides a brief overview of the wikifeeds service.

Contacts

The service is maintained by the Product Infrastructure team, who can be reached in the #wikimedia-infrastructure channel on Freenode.

Primary contacts:

  • Michael Holloway (mdholloway)
  • Bernd Sitzmann (bearND)
  • Mateus Santos (mateusbs17)

Marko Obrovac or Petr Pchelko can also help in the case of operational emergencies.

Overview

Wikifeeds is a node.js webservice supporting the Explore feeds in the official Wikipedia Android and iOS apps.

It creates content that is served via the public REST API feed content endpoints (served by RESTBase):

  • /api/rest_v1/feed/featured/{yyyy}/{mm}/{dd}
  • /api/rest_v1/feed/announcements
  • /api/rest_v1/feed/onthisday/{type}/{mm}/{dd}

See docs on the English Wikipedia: https://en.wikipedia.org/api/rest_v1/#/Feed

The responses for these endpoints are consolidated in RESTBase from a larger number of more narrowly focused responses provided by the wikifeeds service.

Technology

Wikifeeds is split off from the main mobileapps/mobile content service. As such it is a nodejs service. It's a service-runner compatible service based on the Node.js service template.

The service is deployed on the WMF services kubernetes cluster using helm. This means that the service is packaged as a docker image. The docker image is built by the Deployment pipeline.

Deployment

The images that are used in production can be found on the WMF docker registry which is missing a nice UI; the easiest way to see current images is this tool. New images are built, after code is merged to the master branch, automatically by the deployment pipeline.

The production clusters are managed using kubernetes and helm. These are also used for a staging instance as well. The configuration for these can be found in the operations/deployment-charts repo. Details for applying those adjustments to the production clusters can be found here.

Architecture

In a nutshell, the service gathers information about featured content from the templates used to display it on various Wikipedias, and provides it in a standard, structured format.

It provides several endpoints which are in turn consumed by RESTBase to compose larger public endpoint responses:

  • For /feed/featured/{yyyy}/{mm}/{dd}:
    • /page/featured/{yyyy}/{mm}/{dd}
    • /media/image/featured/{yyyy}/{mm}/{dd}
    • /page/most-read/{yyyy}/{mm}/{dd}
    • /page/news
    • /feed/onthisday/selected/{mm}/{dd}
  • For /feed/onthisday/all/{mm}{dd}:
    • /feed/onthisday/births/{mm}/{dd}
    • /feed/onthisday/deaths/{mm}/{dd}
    • /feed/onthisday/events/{mm}/{dd}
    • /feed/onthisday/holidays/{mm}/{dd}
    • /feed/onthisday/selected/{mm}/{dd}

These consolidated responses are composed in RESTBase rather than created directly in the service in order to distribute the load involved in creating them across several workers.

The service also provides a /feed/announcements endpoint that is used to provide content of special announcements for things like campaigns and fundraising. The content of these announcements is currently defined entirely within the service code.

Metrics

The service reports response times via the metrics API provided by service-runner (as is the standard behavior of services based on the Node.js service template).

SLIs/SLOs

To be updated with the results of T233028.

See also