Heres' a comment from reddit I would like to share
Cloudflare only caches about 30% of your requests for a major site. If you're small, they'll get everything, but every CDN has limits on how much of your data they keep on edge. As a free CDN, Cloudflare has pretty stringent limits. Also there's the issue of cache invalidation, which is a lot easier if the cache is something that you control totally yourself. Additionally, a local cache can help you save partial content, which is the next step in any 'make this site fast' strategy.
Hope it helps.
Another benefit is simply React's component-based approach itself. I once went as far as using React for wordpress templating just because I prefer its approach to the standard WP <?php echo $blah ?> shit. I wouldn't recommend that to others though.
Which, given I'm seeing much much less for a rather complex React app... makes me suspicious that something else is going on with their codebase.
I'm seeing maybe 150ms as the upper 95 percentile but median would be 30-60ms and my app isn't exactly small or simple.
BTW have you ever worked with SSR and React ? 150ms is pretty standard time it takes to render a page with SSR. And as mentioned in the post, the 150ms is what we are getting. This is purely dependent on your project. For example, a simple "hello world" page might take a lot less than a full page with lots of components.
And 20ms is the total response time for the page. Redis takes just 2-3ms of it.
If you're properly using Redis, then the total response time should be 2-3ms, or at least very close to that.
> BTW have you ever worked with SSR and React
I haven't - I was hoping the article would shed light on it. The top comment seems to have some great suggestions. There's probably a lot of optimizations one can make at the React/Redux level.
Also.... 20ms with caching the pages in Redis? That sounds really, really slow. There's definitely something else going on.