Page MenuHomePhabricator

Migrate AQS 1.0 off RESTbase
Closed, ResolvedPublic

Description

Goal

The AQS service is currently routed through RESTbase. As part of RESTbase deprecation, this service needs to be migrated off.

Background

Initially, AQS was going to be replaced with AQS 2.0. While the AQS 2.0 project is still underway, AQS needs to be migrated off to remove the dependency for the RESTbase deprecation project.

Tasks

Event Timeline

VirginiaPoundstone renamed this task from MIgrate AQS off RESTbase to Migrate AQS off RESTbase.Jun 9 2023, 5:11 PM

Notes from conversation with Data Engineering:

  1. Rate limiting is enabled by RESTbase but with problems in the implementation (429s)
  2. Headers are controlled directly in AQS without any RESTbase libraries
  3. no enrichment
  4. title normalization would be nice but is not needed
  5. caching is not done by RESTbase, it's done by varnish and configured through the header

Notes from conversation with Data Engineering:

  1. Rate limiting is enabled by RESTbase but with problems in the implementation (429s)

@hnowlan, if we already have support for rate limiting in REST-Gateway, can we just use it for AQS 1.0?

  1. Headers are controlled directly in AQS without any RESTbase libraries

This look like we don't need to do anything on RB side to migrate AQS apart from applying rate limits?

I think AQS1 shoudld be

Notes from conversation with Data Engineering:

  1. Rate limiting is enabled by RESTbase but with problems in the implementation (429s)

@hnowlan, if we already have support for rate limiting in REST-Gateway, can we just use it for AQS 1.0?

We can in theory - what kind of rate limits do we want to apply and using which classifiers? Currently the rest-gateway does not have ratelimiting enabled but it can be turned on pretty easily although we'll need to do some work to ensure that the rate limits don't turn on globally (which is what will happen currently). Not too complex to do though.

  1. Headers are controlled directly in AQS without any RESTbase libraries

This look like we don't need to do anything on RB side to migrate AQS apart from applying rate limits?

See T325827#8597452 for details on the headers that AQS is getting via RESTbase. There are some surprises.

I am unsure as to whether rest-gateway is the right place for AQS1. AQS2 services are being routed via the api-gateway, but these are new services. Is AQS1 a restbase service like any other that restbase routes to? If we're seeing it like that then I guess rest-gateway feels like the right place for it, unless we want to group old and new AQS services together.

We can in theory - what kind of rate limits do we want to apply and using which classifiers? Currently the rest-gateway does not have ratelimiting enabled but it can be turned on pretty easily although we'll need to do some work to ensure that the rate limits don't turn on globally (which is what will happen currently). Not too complex to do though.

I'll investigate the rate limiting support that comes with AQS 1.0 since it's RESTBase-ish. If that doesn't work, then I'll let you know so we can do things the REST-Gateway. But this is something we will end up having in REST-Gateway (at least rate limiting by x-client-ip header - IP addresses).

I am unsure as to whether rest-gateway is the right place for AQS1. AQS2 services are being routed via the api-gateway, but these are new services. Is AQS1 a restbase service like any other that restbase routes to? If we're seeing it like that then I guess rest-gateway feels like the right place for it, unless we want to group old and new AQS services together.

AQS 1.0 is currently routed through RESTBase. So yeah, REST-Gateway is the migration plan until AQS 2.0 is done before we can redirect all traffic to it, as I understand, that's the plan. @VirginiaPoundstone or @FJoseph-WMF can further confirm in case I'm missing something.

But I also understand that AQS 2.0 is using API-Gateway for the end points it already supports/provides.

DAlangi_WMF renamed this task from Migrate AQS off RESTbase to Migrate AQS 1.0 off RESTbase.Jul 9 2023, 8:46 AM
hnowlan claimed this task.