i ensured really fast reponses (RT<3ms) by doing this three steps:
1- First of all understanding client needs and the importance of instant response for optimal user experience.
2- Defining the problem in small steps: in technical side i implemented this on 3 layers
First one is the service layer : the easiest and the light one on size, it fetches the simple content like title, description, FAQs .....
Second Layer : Defining the difference between a service that needs going from point A to point B and this can be done by : linear steps, dropdowns, or slider which accepts 2 values. This is simply can be done via a boolean variable. So a service will only fetch what is on layer 1 + simple boolean variable
Third Layer: This layer will exist only if the boolean is on true, so to go from A to B we should ensure that Last point is > than first point, and we need price from A to B, A to C , B to C and so on...., so the solution was a upper triangular matrix with two parameters (price and required time). So fetching a service that needs this type of pricing will go through those 3 layer, last layer will be fetched depending on the values of 2 body parameters - each api call is dedicated only to get that price and time so very small payload, so each client change will be reflected instantly, but if all the things were implemented in same layer, so loading time will be insane espacially in high traffic.