Changes to CarrierService API rate request timeouts - 10s -> 5s

Solved
Excursionist
18 0 10

Hi ntan,

 

Could you please consider adding some sort of header to tell us what the timeout is for each request? ie `X-shopify-timeout: 10s` otherwise we have no way to gauge how much time we can spend quoting and thus how accurate it can be. ie do we have time to bin pack? Do we have time to get a real quote from a carrier? Or must we use a fallback formula based quote?

 

Having a dynamic timeout is great and all especially if it leaves the upper end for most sites high but it's pretty useless and will result in tons of errors if we can't say hey the timeout is X seconds for this request and we already spent 80% of X, revert to the fallback rates instead because carriers, bin packing, etc are too slow for this request.

FreightChick - Automate your Logistics
CartJumper - Sync with NetSuite
Shopify Partner
164 9 53

@epelc great idea!  This would help apps make logical decisions on what components we can keep enabled and what would need to be skipped to save time.

 

There's the added benefit from a support perspective where we can identify rates that have actually timed out based on the tiered timeout since we would know the actual timeout limit of each request.

Co-Founder / CTO @ Intuitive Shipping Inc.
Intuitive Shipping | Smart Boxing | Automate Shipping Profiles
Shopify Staff
Shopify Staff
7 1 7

Hi guys,

We have heard similar feedback from others and are looking into what would be possible to implement and in what kind of timeframe. We will definitely get back to the community as soon as we have any news to share in this regard. 

 

Shopify Partner
68 1 33

Hi @NevinT

I think this is a much more reasonable initiative, some questions/comments though:

- before anything is rolled out, will/can comms be rolled out to merchants advising them of such a change?

- is the RPM calculated as a rolling window or an average? if so over how long?

- is this going to be applied to Shopify provided plugins too such as the in-build fedex connectors?

Thanks

Min

0 Likes
Shopify Staff
Shopify Staff
7 1 7

Hi @Parcel_Intellig,

Unfortunately we have already started rolling this out, but feel free to reach out to your merchants directly if you feel they need to take any actions with regard to this change.

The RPM is calculated on a rolling 30s window.

I believe plugins should not be affected.

0 Likes
Shopify Staff
Shopify Staff
7 1 7

Hi everyone (@epelc & @Joel-Reeds in particular),

I have some great news to share. Our team has added a new field to the header that includes the response timeout for a given request, named X-Shopify-Timeout. The value given is in milliseconds. Hopefully this will help with your implementations!

As always, please let us know if you have any further feedback. Thanks!

Shopify Partner
164 9 53

Awesome, thanks!

Co-Founder / CTO @ Intuitive Shipping Inc.
Intuitive Shipping | Smart Boxing | Automate Shipping Profiles
0 Likes
Excursionist
18 0 10

Thanks @NevinT, this is a huge help!

FreightChick - Automate your Logistics
CartJumper - Sync with NetSuite
0 Likes
Tourist
3 0 4

Hi @NevinT,

 

I have a question on how the RPM is calculated.  

          1. Does this only applies when shipping_rates.json is called or it it when prepare_shipping_rates.json and async_shipping_rates.json are called together?

          2. What if we only use prepare_shipping_rates.json without the async_shipping_rates.json?

Thank you in advance.

0 Likes
Shopify Staff
Shopify Staff
1 0 0

Hey purple_crayon,

Calling `prepare_shipping_rates.json` and subsequently calling `async_shipping_rates.json` only performs shipping rate calculations once. So there should be no difference in RPM effects whether you only call `prepare_shipping_rates.json` or both.

Regards,
David

0 Likes