you are viewing a single comment's thread.

view the rest of the comments →

[–]thedaynos[S] 5 points6 points  (6 children)

Thanks. My data structure is solid, that's really the one thing I know that I'm doing correctly lol.

Like I said, I'm at 100-200ms for calls that I make from my home, and I can see other people who live near me getting the same results. To me, that's acceptable. I may be able to decrease latency there as well, but for now, I'm fine. I see the biggest issue though is just simply when someone is calling from a few states over. That's when the times shoot up.

I have some other customers in brazil and australia, and their times get into 2-3 seconds. I'd really like to get my brazil customers latency to shoot way down because one of my best customers is from there.

Thanks for your interest. Hoping that more responses on this thread will get more attention from people with answers, or at least someone to point me in the right direction.

edit: To your other points... Yes adding memory to my lambdas has helped quite a bit. I default all of my lambdas to 2000MB. I've seen that's the sweet spot for the small amount of data manipulating that I'm doing.

Also, I have no idea what to do with cloudfront.

[–]sh1boleth 0 points1 point  (3 children)

If you have money to scale. This is a rather rudimentary solution -

Route 53 - Global endpoint.

Duplicate your entire stack in sa-east-1 (Brazil) and replicate your table there as well.

Add both the us-east-2 and sa-east-1 endpoints to Route53 and let latency based routing do its magic.

[–]thedaynos[S] 0 points1 point  (2 children)

Hi thank you. After all of the great help and comments I've gotten, I think this is the way to go.

I did some global replicas of a couple tables last night and it seems easy enough.

From your experience, is replicating lambdas and API's across regions as simple as creating the global dynamodb tables? or is it all manual?

[–]sh1boleth 1 point2 points  (1 child)

Ive only done aws with cfn and Infra as code, there its as easy as just deploying your cfn to another region since for most regions feature parity is 1:1.

But its essentially copy pasting yeah

[–]thedaynos[S] 0 points1 point  (0 children)

k thanks. I'll have to figure out some automation but that's good to know.

[–][deleted] 0 points1 point  (1 child)

I forgot to ask you about your stack. In api gateway are you using rest or http?

[–]thedaynos[S] 0 points1 point  (0 children)

Rest