Page MenuHomePhabricator

Sign-off required: discuss "quicksurvey" query parameter, cache busting implication, how to load a specific survey on a wiki page
Closed, DeclinedPublic

Description

Introduction

The Discovery team wants to run a few quicksurveys on article pages, when coming from search.
We want to have a qualitative estimate of search satisfaction, in addition to the quantitative data we collect.
Related Phab tickets: T118800, T113240 (the big one)

Context

Option 1: Cache busting is not an issue considering the number of page views containing a quicksurvey parameter:
But a valid question is: wouldn't performance impact the user satisfaction, thus the answer given to the survey?

Option 2: Add an exception in varnish for quicksurvey query param:
Duplicates the wprov subroutine here https://github.com/wikimedia/operations-puppet/blob/028fc711bc37cde42c4e475e56afeb15321f9508/templates/varnish/analytics.inc.vcl.erb#L92-L118

Option 3: Add an exception in varnish for quicksurvey query param:
Refactor the wprov subroutine here https://github.com/wikimedia/operations-puppet/blob/028fc711bc37cde42c4e475e56afeb15321f9508/templates/varnish/analytics.inc.vcl.erb#L92-L118
So that it becomes an identified and structured place for sharing information between pages without impacting varnish.
There would be client-side read&write API methods to deal with this kind of parameter, hosted in wprov.

Option 4: Use localStorage to store the [article id, quicksurvey id]
But this solution does not work well when sharing cross-domain information.
Hacks available online may work, but at first sound scary and definitely need more research before adopting.

Option5: Set a cookie to store the [article id, quicksurvey id]
Would solve sharing cross-domain information.
Is this option clean and scalable? Does it have page load drawbacks?

Option 6: Set a URI fragment instead of a query parameter
Wrong use of a URI fragment.
Conflicts? Changing the quicksurvey extension code to officially support URI fragments may be a quick and short enough solution for now but shoot in the foot later.

Sign-Off required
Option 1 would provide us misleading results. We want to reject it.
Discovery team wants to run a quicksurvey. The team is composed of front-end engineers that are fine with any of the 2-6 options above.
QuickSurveys team develops the Extension code. The team seems to be fine with any of the 2-6 options above (in favor of option 2 and 3 that do not require any code change).

We need a sign-off from Operations/Performance in order to move one option forward. From this sign off we should know how we will be able to scale running specific, contextual surveys on Wikipedia.

Event Timeline

• JGirault assigned this task to ori.
• JGirault raised the priority of this task from to Needs Triage.
• JGirault updated the task description. (Show Details)

@BBlack a couple of these options involve varnish config, and avoiding cache busting in the vcl layer. Any opinions?

@EBernhardson - I'd prefer we avoid options like 2 and 3. Sending a query parameter to our servers to serve client-local purposes (no effect on the served content) is just as "wrong" as e.g. incorrect use of a fragment in option 6.

To sidetrack into those concerns a bit: In the long term, we want to reduce our reliance on special code at the Varnish layer, not increase it. This would be yet another example of "If you want to run a MediaWiki anything like Wikimedia's, the MediaWiki code and config alone isn't enough, you also need this list of 4,512 hacks in your varnish and/or apache configurations in front of it for it to work correctly" (not pointlessly fragmenting generic caches counts as "correctly" to me). In an ideal world that we may never reach, all of the customization at the varnish layer should be performance hacks (for things like "stream objects larger than size X") and analytics-related things (because only the front edge actually sees all requests to analyze them), but it shouldn't really have MediaWiki-specific hacks in it (which are often due to misuse of HTTP, or simply offloading code that should be elsewhere to the Varnish layer, because it's "easier").

@JGirault: Didn't we end up deciding that option 1 (cache-busting) was our best path forward for now?

@ksmith @Deskana I think there is broader interest in this ability. Please let me know how, if at all, I can help move this forward. I am currently not sure what the blockers are, but maybe its simply a matter of prioritization.

@ksmith Yes, we decided to go with option 1 for now.

I just want to add, before we decide to close this ticket, that this decision isn't helping much for the quicksurvey we want to run on the portal page: performance/load time is something that impacts user satisfaction. It may not be obvious for most people who are lucky to have fast internet, but it can easily slow down loading the page by a few painful seconds for people with slower network (which is a bit ironic when the reason for slowing down is to ask people how satisfied they are).

moving to the Portal backlog board for future work/discussion

ori removed ori as the assignee of this task.Nov 19 2016, 7:09 PM
ori subscribed.
Jdrewniak triaged this task as Medium priority.