paas-admin icon indicating copy to clipboard operation
paas-admin copied to clipboard

Calculator doesn't work for 22+ services

Open 46bit opened this issue 6 years ago • 7 comments

The pricing calculator passes around the service data in its GET query string. This hits haproxy's size limit. This bug was already recorded on paas-billing, but fixing it would require changes to both.

Ideally a fix would allow all these things:

  • Pricing calculator links are still sharable;
  • Pricing calculator doesn't require big changes (i.e., no JavaScript);
  • Can use arbitrary numbers of services.

Ideas for how to fix this:

  • Remove haproxy or increase its 8K GET header size limit (involves bigger platform infra changes);
  • Switch to POST for these requests and accept URLs won't be sharable (stops url being sharable);
  • Compress and base64 the data using JavaScript (requires JavaScript and changes to both the calculator and paas-billing);
  • Use POST but then have the data saved in a database and the user redirected to a sharable URL (disadvantage: another database to maintain.)

46bit avatar Apr 25 '19 10:04 46bit

I'm not going to fix this right now because it is too big and there isn't a clear need. But it's worth remembering in case we work on the calculator again in future.

46bit avatar Apr 25 '19 10:04 46bit

This was noticed by a GOV.UK PaaS tenant in this zendesk issue:

GOV.UK PaaS internal Zendesk link

richardTowers avatar May 23 '19 16:05 richardTowers

We could quickly change the pricing calculator to only price up the first 12 items. Disable the links to add extra items and add a warning that for >12 items they should price it up again. I don't know if it's worth doing when the tenant figured that out for themself :)

46bit avatar May 23 '19 17:05 46bit

Is this still a problem given @richardTowers' magic calculator?

AP-Hunt avatar Sep 04 '19 09:09 AP-Hunt

I seem to be able to get up to ~19 services now, then it starts going wrong (400 from HAProxy I think). Will be interesting to see whether this goes away when we play the story to remove HAProxy and use ALBs though.

richardTowers avatar Sep 04 '19 09:09 richardTowers

I just tried hitting paas-admin using the ALB directly and I can get >21 services, didn't try more than that

tlwr avatar Sep 04 '19 09:09 tlwr

This is now a bug for 22 services since we deployed our request path changes with the ALB

tlwr avatar Dec 06 '19 17:12 tlwr