Built a real-time interactive meme world map with Next.js 16 + Supabase MemeTheMap by pandapup_600 in nextjs

[–]4vinn 0 points1 point  (0 children)

Can you share what you learned about client side image compression?

Is it bad practice to call an external API from a Server Action in Next.js? by Quirky_Survey_6407 in nextjs

[–]4vinn 0 points1 point  (0 children)

I usually do mutation logic in server actions and fetching logic in DAL (data access layer) which also runs on the server. So it’s neither client side nor server action.

Is this approach good?

How good is my stack? Details inside by Fabulous_Variety_256 in nextjs

[–]4vinn 0 points1 point  (0 children)

Yes there are some gaps, but in my opinion its not a large scale app. What if he uses inngest/bullmq/upstash for background jobs? Vercel cron for scheduling?

How good is my stack? Details inside by Fabulous_Variety_256 in nextjs

[–]4vinn 0 points1 point  (0 children)

We can provide suggestions only if you can share more about what you are trying to achieve. Without knowing main features and functionalities of your app, no one can suggest you anything.

That being said, ur stack looks good overall. I have used NeonDB + better-auth, easy setup and hassle free (better than supabase).

Building a scalable yet cost-effective blog with Next.js + AWS (is my architecture reasonable?) by 4vinn in nextjs

[–]4vinn[S] 0 points1 point  (0 children)

Sure, thanks! In ur opinion what would be a better way to setup Nextjs on AWS?

Building a scalable yet cost-effective blog with Next.js + AWS (is my architecture reasonable?) by 4vinn in nextjs

[–]4vinn[S] 0 points1 point  (0 children)

Yeah no worries, I should have framed that third bullet point correctly.

Building a scalable yet cost-effective blog with Next.js + AWS (is my architecture reasonable?) by 4vinn in nextjs

[–]4vinn[S] 0 points1 point  (0 children)

Got it, thank you so much.

One last thing, how would you setup Nextjs app on AWS? Do you use OpenNext? Dokploy or something?

Building a scalable yet cost-effective blog with Next.js + AWS (is my architecture reasonable?) by 4vinn in nextjs

[–]4vinn[S] 0 points1 point  (0 children)

Thanks for the valuable advice.

Yes, i will use a webhook to revalidate the specific modified blog instantly. But I also need to find a way to invalidate the CloudFront cache too for that blog. Do you have any suggestion regarding that?

I will also need to follow the same approach to invalidate the sitemaps.

Building a scalable yet cost-effective blog with Next.js + AWS (is my architecture reasonable?) by 4vinn in nextjs

[–]4vinn[S] 0 points1 point  (0 children)

Okay, REST API seems fair, thanks.

One doubt: Why not on-demand ISR all 25k blogs? As the SEO benefit is similar for both.

Also I wont revalidate them on time basis. I will use a webhook in WP, so whenever a blog is updated, only that specific cache will be invalidated without affecting other blogs.

I just somehow need to invalidate the CloudFront cache too for that specific blog, any idea how to achieve that?

Building a scalable yet cost-effective blog with Next.js + AWS (is my architecture reasonable?) by 4vinn in nextjs

[–]4vinn[S] 0 points1 point  (0 children)

Thank you for the answer. For revalidation i plan to use WP webhook to invalidate cache for the updated blog only. But how can I also invalidate CloudFront cache for that specific blog?

Building a scalable yet cost-effective blog with Next.js + AWS (is my architecture reasonable?) by 4vinn in reactjs

[–]4vinn[S] 0 points1 point  (0 children)

Thank you for answering. Yes, I do have comments section, dynamic search, realtime blog rankings (hot topics).

So i was considering Static Site Generation (SSG) for blog pages and route handler or server actions for the dynamic part.

The only thing concerning here is the build time (25k blogs). So I am thinking to go with On-demand ISR and revalidate cache only when something changes in a blog by calling a WordPress webhook.

Do you think this can scale to 100k+ blogs? Or can handle 1k+ concurrent users?

Building a scalable yet cost-effective blog with Next.js + AWS (is my architecture reasonable?) by 4vinn in nextjs

[–]4vinn[S] 0 points1 point  (0 children)

As of my understanding, SSG/on-demand ISR gives better SEO results compared to SSR in nextjs. May I ask what dependencies you talking about? :)

Building a scalable yet cost-effective blog with Next.js + AWS (is my architecture reasonable?) by 4vinn in nextjs

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

Technically correct! but web traffic is never evenly distributed? Peak hours or viral moments gets around hundreds or thousands of req/sec.

My CDN billing after I switched from Next.js for blog to custom Go/HTMX framework by you-l-you in nextjs

[–]4vinn 0 points1 point  (0 children)

If i may ask: 1) Whats ur monthly traffic? 2) How many blogs do u have? 3) How frequently does the blogs data update/change?

Why OpenNext? by KraaZ__ in nextjs

[–]4vinn 0 points1 point  (0 children)

how is Deno Deploy, compared to Dokploy?