Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Need Help with Slow Website Performance, plz!
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Need Help with Slow Website Performance, plz!

raza19raza19 Veteran

Dear Web & DevOps Experts,

I've been working hard on a website for the past entire year, but I'm currently facing significant issues with load times, particularly in Asia. Here's a breakdown of my setup and the problems I'm encountering:

  • Hosthatch VPS: 32gb ram with 200GB NVME 4 Epyc core server
  • Current Setup: Cloudflare acting as a reverse proxy.
  • CDN Tried: BunnyCDN, but it didn't resolve the terrible load times in Asia.
  • Server Location: UK (which might have been a mistake as my primary customer base is in the USA).

Performance Metrics:

  • North America:

    • PageSpeed Mobile Scores: Above 90
    • LCP: Under 2 seconds
  • Europe:

    • PageSpeed Mobile Scores: Above 90
    • LCP: Under 1 second
  • Asia:

    • PageSpeed Mobile Scores: 50-60
    • LCP: Between 4-10 seconds!

Issues:

  • TTFB (Time to First Byte)
  • FCP (First Contentful Paint)
  • LCP (Largest Contentful Paint)
  • General load delay and load time, especially for the homepage.

What I've Tried:

  • Implementing BunnyCDN, which helped with asset loading times but that doesn't do anything for the homepage load times in Asia.

What I Need:

I'm looking for advice on how to tackle the slow and random performance. Here are some specific questions:
1. What can I do to improve root document delivery speed ?
2. Are there better CDN strategies or providers that could help improve my website's performance in Asia? Is using cloudflare by any chance a mistake?
3. Any other optimization tips that could help reduce TTFB, FCP, and LCP, particularly for the Asian region?

Any help or suggestions would be greatly appreciated, Thank you!

Comments

  • SpeedBusSpeedBus Member, Host Rep

    Do you have BBR enabled ? -- could be worth enabling as well.

    Thanked by 2raza19 c_vps
  • PusePuse Member

    Can you do a test how long would it take to open pages if you put bunny as a reverse proxy.

    If using cloudflare, consider creating a rule to cache the root page on edge. It will bring a signifcant improvement. Minimum cache time on a free plan is 2h.

    Thanked by 1raza19
  • EthernetServersEthernetServers Member, Patron Provider

    Is there a CMS running on here, i.e. WordPress?

    Thanked by 1raza19
  • DooDoo Member
    edited May 18
    1. Put your origin server in EU is never a good idea, if you want your website to give better experience to visitors from Asia.

    2. Setting up proper cache rules may help in some cases. If possible, you can even cache homepage for like 1h or longer by properly configuring Cloudflare cache rules, which should be useful when the cache is hit from most of cloudflare edge pops, then visitors can fetch resources from cloudflare pop closet to them instead of fetching from your origin server.

    3. There are, of course, many other strategies to accelerate your website, such as geo balancing, anycasting, etc. But your details and budget are not that specific, so I'm afraid I cannot give more specific remedy.

    4. Cloudflare is more than enough to build a fast website if you know and use it well.

    5. You may learn a lot by taking a look at www.whitehouse.gov and www.google.com and ask yourself why they are so fast, and then try to find out answers on your own and apply what you've learned to build your own solution.

    Thanked by 1raza19
  • vitobottavitobotta Member

    Is it a static site, a CMS, a web application or? You need to give more details.

    Thanked by 1raza19
  • raza19raza19 Veteran

    @SpeedBus said:
    Do you have BBR enabled ? -- could be worth enabling as well.

    FIrst time hearing about this. Going to enable it and report back.

  • raza19raza19 Veteran
    edited May 18

    @Puse said:
    Can you do a test how long would it take to open pages if you put bunny as a reverse proxy.

    If using cloudflare, consider creating a rule to cache the root page on edge. It will bring a signifcant improvement. Minimum cache time on a free plan is 2h.

    Never knew cloudflare allowed caching of the dynamic content! That should in theory resolve all the issues bcoz the website has products that don't change much but I wonder how it wud handle serving of pages to logged in customers. Going to dig in deeper.

    edit: also, didn't know bunny cdn allowed reverse proxy for non static content.

  • raza19raza19 Veteran

    @EthernetServers said:
    Is there a CMS running on here, i.e. WordPress?

    Yes, Magento! Regretting the choice after almost an year of development. While some will definitely find it useful for their purpose I have found the structure to be an overall mess. Just badly designed and the open source community around it is mostly non existent.

    Nevertheless, after massive tuning and cache after cache I have managed to bring the performance to an acceptable level. Its the delivery that is an issue. Currently, I don't have the budget or time to experiment and learn clustering which I guess will be the ultimate solution. But @Puse 's suggestion of caching index at edge can be a game changer. Will start experimenting with it after this.

  • raza19raza19 Veteran

    @Doo said:
    1. Put your origin server in EU is never a good idea, if you want your website to give better experience to visitors from Asia.

    You are right but now we are just too far in. At the time it seemed like a nice idea bcoz although majority of the customers are from the US, UK seemed like a nice middle ground for worldwide latency reasons but I didn't imagine the location having such a drastic role in delivery/performance.

    1. Setting up proper cache rules may help in some cases. If possible, you can even cache homepage for like 1h or longer by properly configuring Cloudflare cache rules, which should be useful when the cache is hit from most of cloudflare edge pops, then visitors can fetch resources from cloudflare pop closet to them instead of fetching from your origin server.

    Thats what I am going to start experimenting with after these msgs. Seems very promising. I always saw the cache rules section but never tried exploring it, clearly its a treasure-trove!

    1. There are, of course, many other strategies to accelerate your website, such as geo balancing, anycasting, etc. But your details and budget are not that specific, so I'm afraid I cannot give more specific remedy.

    Yes like my msg above, currently we are very budget constrained bcoz for over an year everything has been going in and nothing coming out! Everyone wants results now. I was seriously considering setting up geodns for static content bcoz I have like over 2 dozen heavy hitting vps spread all around the globe so it seemed like a great idea but instead we just went with bunnycdn bcoz any further development or experimentation will just run us dry. But I wud be very interested in learning anycast in the future.

    1. Cloudflare is more than enough to build a fast website if you know and use it well.

    Thanks. going to start experimenting with it.

    1. You may learn a lot by taking a look at www.whitehouse.gov and www.google.com and ask yourself why they are so fast, and then try to find out answers on your own and apply what you've learned to build your own solution.

    sure, will do.

  • raza19raza19 Veteran

    @vitobotta said:
    Is it a static site, a CMS, a web application or? You need to give more details.

    Its basically magento with many custom made modules and a theme that is built on top of magento's default luma(big mistake). Nevertheless, with varnish, redis, opcache and mysql caches the perfomance of magento itself is tolerable. the issue is in the delivery and it has been hard for me to distinguish where things are slacking. I need to learn more about this but I can't tell if the fault lies with the host in how it is peering with other networks, like where are the bottlenecks slowing performance to asia. Also, confused if the issue is on the host's side, cloudflare's side, just overall network congestion somewhere in the middle or visitor's side.

    Wud really luv, some pointers in the right direction! It feels like detective work.

  • raza19raza19 Veteran

    Ho li f ! Boys, I have a score of 94 in Asia now ! Thanks @Puse & @Doo , Cloudflare did it. Its delivering cached response from the edge. The homepage is delivered in less than 600 ms !!!!

    but now I need to fine tune the rules to exclude logged in customer pages and admin side. I am wondering if instead of telling cloudflare wt to cache and wt not, if I tell it to cache everything starting with the domain name and exclude few prefixes wud it still work, bcoz i only see a limited number of rules.

    Thanked by 3Doo Puse BBTN
  • PusePuse Member
    edited May 19

    The best you can do is tweak Cache Rules. Create a single rule and play around with URI Path starts with or URI path is in and put everything you need in it. I would not risk and just configure what it should cache and avoid automatically cahing something you might not be well aware of.

    You can also DM me and I can share with you an example of my setup.

    I moved one of my projects over to bunny for a better connectivity in Germany, load balancing and few other reasons. You can setup the caching there as well, but it is not as flexible as Cloudflare.

    Thanked by 1raza19
  • I recommend looking into a CDN that has servers in Asia to improve load times for that region. Cloudflare is a popular choice, but other providers like Fastly or Akamai may better suit your needs. Also, optimizing your website's code, reducing server response times, and minimizing the number of HTTP requests can help improve performance.

    Thanked by 1raza19
Sign In or Register to comment.