You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using sandpack to showcase what is possible with our SDK, and it's working great.
Each time we update the site to point to the new release of our packages, there can be a few minutes delay on first load since the packages are not in your cache already. Since I am testing it first, for my region it's ok by the time we publish.
Other users in different geos experience the same delay when they access our site, and if possible it would be ideal if we can do something to get ahead before pushing site updates.
Looking at browser traffic, it seems there is a lambda function called when the package is not available, to initiate the cache population (I think) - but since this function is different per AWS region we have that regional problem.
@CompuIves If you can think of any workaround (I don't mind making some manual GET requests, if you can share the endpoints for each region, since I only have eu-west-1 now) I would be very grateful!
edit: I should add, I'm making some assumptions here, that there are different regions used, based on reports from my colleagues. I may be wrong
The text was updated successfully, but these errors were encountered:
Hey! Yes, you're completely right. What we essentially do is:
The client checks if the package is already available in an S3 bucket that's fronted by Cloudflare
If it's not available, it will call a Lambda function that installs the package, extracts relevant files and then puts it in the S3 bucket
I think, for your use case, it would be sufficient to directly call the lambda function on publish. As soon as the package is in S3, we will bypass the lamdba function altogether. The API of the lambda function is very stable at this point, it has been untouched for a couple of years! 😂
So to confirm - there is only one function to call (aiwi8rnkp5.execute-api.eu-west-1.xxxxx) and there are no other/different URLs needed for different regions, is that right?
I will try this on our next release and see if it works well, if so we might be able to add it as part of our release process (only every 2 weeks, not every hour don't worry 😂 )
We are using sandpack to showcase what is possible with our SDK, and it's working great.
Each time we update the site to point to the new release of our packages, there can be a few minutes delay on first load since the packages are not in your cache already. Since I am testing it first, for my region it's ok by the time we publish.
Other users in different geos experience the same delay when they access our site, and if possible it would be ideal if we can do something to get ahead before pushing site updates.
Looking at browser traffic, it seems there is a lambda function called when the package is not available, to initiate the cache population (I think) - but since this function is different per AWS region we have that regional problem.
@CompuIves If you can think of any workaround (I don't mind making some manual GET requests, if you can share the endpoints for each region, since I only have eu-west-1 now) I would be very grateful!
edit: I should add, I'm making some assumptions here, that there are different regions used, based on reports from my colleagues. I may be wrong
The text was updated successfully, but these errors were encountered: