Calculator doesn't work for 22+ services
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
POSTfor 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.)
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.
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 :)
Is this still a problem given @richardTowers' magic calculator?
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.
I just tried hitting paas-admin using the ALB directly and I can get >21 services, didn't try more than that
This is now a bug for 22 services since we deployed our request path changes with the ALB