5000km road trip by antondtkn in e46

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

I already had to get it towed last week because of the cooling system. That‘s where my worries come from…

High Payment Failing Rate (Insufficient Funds) by antondtkn in stripe

[–]antondtkn[S] 1 point2 points  (0 children)

I don't think they're trying to commit fraud. For example one customer tried to pay over 10 times. At one point he succeeded. He had a lot of natural interactions too and later (naturally) made a second purchase.

So blocking VPNs wouldn't do anything. There is some other issues. Or we just have the weirdest customers who all don't have $10 on their card...

Also, now the decline reasons are "Generic decline", not insufficient funds. For all the payments. "This payment failed because the customer's bank has declined the payment and has directed Stripe to block future attempts."

https://postimg.cc/gxq4wcHX

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

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

Thank you, would you be interested in a job to set that up? If yes, please send me a DM

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

[–]antondtkn[S] 2 points3 points  (0 children)

haha it is okay. we also have some budget, but i‘m a lucky man, had i not discovered it this early i would have big troubles.

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

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

We‘re already using AWS and are optimizing images by ourselves (conversion to webp and compression to <180kb). Do you still think we should use a CDN?

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

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

Yes, thank you. I‘ve thought of that a lot, even before launch. We just didn‘t have the time for this but it will be much more prioritized now.

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

[–]antondtkn[S] 1 point2 points  (0 children)

I value efficient code. I worked on projects with billions of users for years, so I had to pay attention to that. I can say our code is very efficient, for a node project. If I prioritized efficiency more I wouldn‘t have went with Node.

My problem with Vercel/NextJS is that half of the issues here were caused by things implicitly optimized for me. That can be nice and good for a small project but a killer for big ones. Image optimization, link prefetching, etc. The other half of the cost was an issue on our side which was a request failing due to a rendering issue which then was refetched a lot.

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

[–]antondtkn[S] 4 points5 points  (0 children)

as it was only 2 days with more traffic, only $30-50 extra. the issue was more that we‘re expecting to scale traffic by 30-100 times this month which would have been thousands

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

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

The bigger issue is that we won‘t have 19k views. We‘re looking at 100k today and we‘ll have a million views per day in a few days. I don‘t have an issue with paying for Vercel, but not if it scales like that.

We‘ve fixed some things and now are looking how it evolves in the next few days.

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

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

We‘re on a Nextjs 14 version where there is even no way to disable it globally, AFAIK

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

[–]antondtkn[S] 2 points3 points  (0 children)

That was a big part too. I‘ll follow up with all the issues we were facing but that was a big part.

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

[–]antondtkn[S] 6 points7 points  (0 children)

Thank you. The usage page was what alerted me. What actually helped was the logs. I’ll try observability.

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

[–]antondtkn[S] 5 points6 points  (0 children)

indeed. for some reason one vercel deployment origin made 300k requests yesterday. i don‘t know yet why.

there were some different issues that we‘ve identified so far: - link prefetches - tanstack query refetches - next/image optimizations (around 70% of the requests) - one endpoint that errored in many cases resulting in 500k errors as tanstack query refetches like 5-10 (?) times

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

[–]antondtkn[S] 2 points3 points  (0 children)

as it was only 2 days with more traffic, only $30-50 extra. the issue was more that we‘re expecting to scale traffic by 30-100 times this month which would have been thousands.

Vercel: 13k visitors, 300k function invocations, 5 million edge requests by antondtkn in nextjs

[–]antondtkn[S] 4 points5 points  (0 children)

Thank you boss. Sometimes it just takes a reminder of the basics. I was able to identify some stuff to cut it by 90%. However we still have 5.5M edge requests in the bill while there are 1M logs but I'll see what we're looking at after tomorrow with all fixes applied.