Jump to content

EchoStore

From Wikitech

Echostore provides application servers with shared access to the Echo extension's seen-time cache. It utilizes Kask, a RESTful opaque key/value storage abstraction on top of Apache Cassandra, deployed in an active/active configuration in both the eqiad and codfw data-centers.

Production Environment

Service endpoints

Discovery

https://echostore.discovery.wmnet:8082/echoseen/v1

eqiad

https://echostore.svc.eqiad.wmnet:8082/echoseen/v1

codfw

https://echostore.svc.codfw.wmnet:8082/echoseen/v1

staging

https://staging.svc.eqiad.wmnet:8082

Prometheus metrics

https://echostore.discovery.wmnet:8082/metrics

Readiness

https://echostore.discovery.wmnet:8082/healthz

Cassandra

Utilizes the RESTBase storage cluster.

Common Tasks

Deployment

k8s

Follow the Kubernetes documentation for the echostore service.

The namespace and Kubernetes service is called "echostore" while the Helm chart used is named "kask".

Deployment-prep

Unlike production, Docker is used to deploy the echostore service in the deployment-prep environment.

In a web browser:

  1. Visit https://horizon.wikimedia.org
  2. Select the deployment-prep project
  3. Select Project → Compute → Instances (in the sidebar)
  4. Locate and select the deployment-echostoreNN instance
  5. Select the Puppet Configuration tab
  6. Scroll to the bottom of the page, and click edit for Hiera Config (see below)
  7. Click "Apply Changes"
  8. Run sudo run-puppet-agent from deployment-echostoreNN
Sample Hiera Config
profile::cassandra::instances:
  deployment-echostoreNN.deployment-prep.eqiad1.wikimedia.cloud: {}
profile::docker::engine::declare_service: true
profile::docker::engine::settings: {}
profile::docker::engine::version: 1.12.6-0~debian-jessie
profile::docker::runner::service_defs:
  mediawiki-services-kask:
    config:
      base_uri: /echoseen/v1
      cassandra:
        authentication:
          password: cassandra
          username: cassandra
        hosts:
        - deployment-echostoreNN.deployment-prep.eqiad1.wikimedia.cloud
        keyspace: sessions
        table: values
      default_ttl: 86400
      listen_address: 0.0.0.0
      listen_port: 8080
      openapi_spec: /go/src/gerrit.wikimedia.org/r/mediawiki/services/kask/openapi.yaml
      service_name: sessions
    namespace: wikimedia
    override_cmd: ./kask --config /etc/mediawiki-services-kask/config.yaml
    port: 8080
    version: v1.0.10
The contents of mediawiki-services-config.config are written verbatim to the container as /etc/mediawiki-services-kask/config.yaml (the Kask configuration file)
Use mediawiki-services-kask.version to specify the Kask Docker image tag. Use mediawiki-services-kask.port to assign the port Kask will listen on.

Pool and Depool

FIXME: Stub.

See also