department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
282 stars 203 forks source link

Monitoring Tools - Create a standardized process to monitor and leverage website performance #1682

Closed rianfowler closed 2 years ago

rianfowler commented 5 years ago

Problem

The platform needs a proper performance monitoring process for the website to ensure we can have standardized ways to measure, evaluate and govern website monitoring so that we can promote valuable improvements and ensure stability.

VSP Q1 + Q2 2020 OKRs

O5: All customers comply with the Platform's standards.

Measuring Success

Details and Notes

copied from: https://github.com/department-of-veterans-affairs/vets.gov-team/issues/13265#issue-360863830

We don't do a good job of monitoring front end performance at Vets.gov. In an ideal world, we would look at our metrics and set a performance budget, then calculate backwards to get rough bundle size requirements, which can then be enforced. Then the performance of our site would be regularly checked or monitored through RUM tools and the bundle size requirements adjusted regularly.

But given that we don't have all that, a simpler approach would be to decide a performance budget that we think is realistic and work towards that. One calculation comes out to about 170kb of compressed HTML, JS, and CSS on a page (https://infrequently.org/2017/10/can-you-afford-it-real-world-web-performance-budgets/). Vets.gov is at 485kb for the homepage, so a 250kb budget might be an achievable goal for content pages.

The above is just an example, we need to put more thought into how to come up with those numbers.

Hypothesis

But in general, we serve too much Javascript and CSS to users on Vets.gov, especially on content pages. We also serve too many small JS files, which pushes back the start of the main JS bundle, further slowing down load times. This primarily impacts disadvantaged users on older mobile devices on slow networks. See https://twitter.com/slightlylate/status/1039694738905952256

Hitting performance goals like the above is hard for React based apps, but can definitely get closer:

Areas for Discovery

There are also some suggestions in this GH issue which we should look into: department-of-veterans-affairs/vets-website#8391

brandonrapp commented 4 years ago

Setting up Speedcurve to monitor the top 10 landing pages for va.gov (May 2019-May 2020)

  1. www.myhealth.va.gov/mhv-portal-web/home - 18.79%
  2. www.va.gov/ - 10%
  3. www.ebenefits.va.gov/ebenefits/homepage - 8.54%
  4. www.myhealth.va.gov/mhv-portal-web/user-login - 2.84%
  5. www.myhealth.va.gov/mhv-portal-web/home/ - 2.32%
  6. www.publichealth.va.gov/n-coronavirus/ - 1.29%
  7. www.myhealth.va.gov/mhv-portal-web/user-login?redirect=/mhv-portal-web/home - 1.28%
  8. www.myhealth.va.gov/web/myhealthevet/home - 1.16%
  9. (other) - 1.14%
  10. www.ebenefits.va.gov/ebenefits/homepage/ - 0.94%

Top 3 landing pages for incoming traffic - 37.33% of total incoming traffic Top 10 landing pages for incoming traffic - 48.3% of total incoming traffic