News for hackers. Stuff that matters.
Re:The architecture behind a one-person tech startup by uh_uh on Thursday April 08, 2021 @12:19PM (#26740629)
If your frontend is on CDN, how are you handling auth? Do you use Firebase for that?
Re:The architecture behind a one-person tech startup by rory on Thursday April 08, 2021 @12:37PM (#26740863)
I oversimplified a bit. I have a low-traffic "admin" interface that's rendered server-side. The people using that are my direct customers and are the only authenticated users (they auth in a traditional in-app way).

I also have a high(er)-traffic frontend on a CDN which is used by their customers. User writes there are purchases/payments handled by third(fourth?)-party SaaS.

Re:The architecture behind a one-person tech startup by hinkley on Thursday April 08, 2021 @01:56PM (#26741772)
Many sites have low write:read ratios and don’t leverage that fact in their architectural choices. Availability for maintainers is often less critical than for consumers, and your life is better if you build that in.

My current employers still haven’t learned this lesson and think caching fixes everything.

Re:The architecture behind a one-person tech startup by pdimitar on Thursday April 08, 2021 @04:30PM (#26743380)
Not sure I am following you: why shouldn't we use cache?
Re:The architecture behind a one-person tech startup by hinkley on Friday April 09, 2021 @09:15AM (#26750130)
Tons of reasons, but the main one is that cache is shared mutable state, pretending not to be. It has all of the ugly attributes of global variables, especially where knowledge transfer and reliability are concerned.

In a read-mostly environment you can often more easily afford to update the state all at once. It’s clear what the effects are because they happen sequentially. The cost of an update isn’t fanned out and obscured across the codebase, where or your team can delude yourself of the true system cost of a suspect feature.

Re:The architecture behind a one-person tech startup by pdimitar on Friday April 09, 2021 @09:40AM (#26750425)
I agree that caching is mostly a bandaid fix. But IMO if it's used judiciously -- namely in response of a demand for a quick fix of a performance problem -- they can be OK mid-term.

As for shared mutable state, yes, that's true, but what are the alternatives? Whether it's memcached or Redis or an in-process cache (like Erlang/Elixir have), the tradeoffs seem mostly the same.

Re:The architecture behind a one-person tech startup by hinkley on Friday April 09, 2021 @11:53AM (#26752149)
> namely in response of a demand for a quick fix of a performance problem

Caches are addictive. The first one is 'free' (easy) and people start wanting to use that solution for all their problems, especially social problems (we can't convince team A to get their average response time to match our SLA, so we'll just cache them to 'fix' it)

They defer thinking about architectural problems until later, when they are so opaque that "nobody could blame you" for having trouble sorting them out. But I do. Blame them, that is.