Add backend performance best practices

pull/5388/head
Kamran Ahmed 8 months ago
parent 0d43103323
commit cdb9a87c85
  1. 18
      scripts/best-practice-dirs.cjs
  2. 4527
      src/data/best-practices/backend-performance/backend-performance.json
  3. 30
      src/data/best-practices/backend-performance/backend-performance.md
  4. 1
      src/data/best-practices/backend-performance/content/architectural-styles.md
  5. 1
      src/data/best-practices/backend-performance/content/async-logging.md
  6. 1
      src/data/best-practices/backend-performance/content/authentication-authorization.md
  7. 1
      src/data/best-practices/backend-performance/content/cache-invalidation.md
  8. 1
      src/data/best-practices/backend-performance/content/caching-locations.md
  9. 1
      src/data/best-practices/backend-performance/content/caching-strategies.md
  10. 1
      src/data/best-practices/backend-performance/content/cdns.md
  11. 1
      src/data/best-practices/backend-performance/content/cleanup-data.md
  12. 1
      src/data/best-practices/backend-performance/content/compiled-languages.md
  13. 1
      src/data/best-practices/backend-performance/content/connection-pool-settings.md
  14. 1
      src/data/best-practices/backend-performance/content/connection-pooling.md
  15. 1
      src/data/best-practices/backend-performance/content/connection-timeouts.md
  16. 1
      src/data/best-practices/backend-performance/content/critical-paths.md
  17. 1
      src/data/best-practices/backend-performance/content/db-indexes.md
  18. 1
      src/data/best-practices/backend-performance/content/denormalize.md
  19. 1
      src/data/best-practices/backend-performance/content/enable-compression.md
  20. 1
      src/data/best-practices/backend-performance/content/implement-pagination.md
  21. 1
      src/data/best-practices/backend-performance/content/index.md
  22. 1
      src/data/best-practices/backend-performance/content/join-operations.md
  23. 1
      src/data/best-practices/backend-performance/content/keep-alive.md
  24. 1
      src/data/best-practices/backend-performance/content/lazy-eager.md
  25. 1
      src/data/best-practices/backend-performance/content/load-balancing.md
  26. 1
      src/data/best-practices/backend-performance/content/message-brokers.md
  27. 1
      src/data/best-practices/backend-performance/content/minimize-iframe-count.md
  28. 1
      src/data/best-practices/backend-performance/content/monitoring-logging.md
  29. 1
      src/data/best-practices/backend-performance/content/network-latency.md
  30. 1
      src/data/best-practices/backend-performance/content/offload-heavy.md
  31. 1
      src/data/best-practices/backend-performance/content/optimize-algorithms.md
  32. 1
      src/data/best-practices/backend-performance/content/orm-queries.md
  33. 1
      src/data/best-practices/backend-performance/content/pagination-large-data.md
  34. 1
      src/data/best-practices/backend-performance/content/perf-testing.md
  35. 1
      src/data/best-practices/backend-performance/content/prefetch-preload.md
  36. 1
      src/data/best-practices/backend-performance/content/profile-code.md
  37. 1
      src/data/best-practices/backend-performance/content/profiling-tools.md
  38. 1
      src/data/best-practices/backend-performance/content/prometheus-graphana.md
  39. 1
      src/data/best-practices/backend-performance/content/reasonable-payload.md
  40. 1
      src/data/best-practices/backend-performance/content/regular-audits.md
  41. 1
      src/data/best-practices/backend-performance/content/replication.md
  42. 1
      src/data/best-practices/backend-performance/content/request-throttling.md
  43. 1
      src/data/best-practices/backend-performance/content/scaling-strategies.md
  44. 1
      src/data/best-practices/backend-performance/content/select-star.md
  45. 1
      src/data/best-practices/backend-performance/content/similar-requests.md
  46. 1
      src/data/best-practices/backend-performance/content/slow-logging.md
  47. 1
      src/data/best-practices/backend-performance/content/streaming-large.md
  48. 1
      src/data/best-practices/backend-performance/content/unnecessary-computation.md
  49. 1
      src/data/best-practices/backend-performance/content/up-to-date.md
  50. 1
      src/data/best-practices/backend-performance/content/use-db-sharding.md
  51. 1
      src/data/best-practices/backend-performance/content/utilize-caching.md

@ -5,7 +5,7 @@ const CONTENT_DIR = path.join(__dirname, '../content');
// Directory containing the best-practices // Directory containing the best-practices
const BEST_PRACTICE_CONTENT_DIR = path.join( const BEST_PRACTICE_CONTENT_DIR = path.join(
__dirname, __dirname,
'../src/data/best-practices' '../src/data/best-practices',
); );
const bestPracticeId = process.argv[2]; const bestPracticeId = process.argv[2];
@ -33,18 +33,18 @@ if (!bestPracticeDirName) {
const bestPracticeDirPath = path.join( const bestPracticeDirPath = path.join(
BEST_PRACTICE_CONTENT_DIR, BEST_PRACTICE_CONTENT_DIR,
bestPracticeDirName bestPracticeDirName,
); );
const bestPracticeContentDirPath = path.join( const bestPracticeContentDirPath = path.join(
BEST_PRACTICE_CONTENT_DIR, BEST_PRACTICE_CONTENT_DIR,
bestPracticeDirName, bestPracticeDirName,
'content' 'content',
); );
// If best practice content already exists do not proceed as it would override the files // If best practice content already exists do not proceed as it would override the files
if (fs.existsSync(bestPracticeContentDirPath)) { if (fs.existsSync(bestPracticeContentDirPath)) {
console.error( console.error(
`Best Practice content already exists @ ${bestPracticeContentDirPath}` `Best Practice content already exists @ ${bestPracticeContentDirPath}`,
); );
process.exit(1); process.exit(1);
} }
@ -88,10 +88,12 @@ function prepareDirTree(control, dirTree) {
return { dirTree }; return { dirTree };
} }
const bestPractice = require(path.join( const bestPractice = require(
__dirname, path.join(
`../public/jsons/best-practices/${bestPracticeId}` __dirname,
)); `../src/data/best-practices/${bestPracticeId}/${bestPracticeId}`,
),
);
const controls = bestPractice.mockup.controls.control; const controls = bestPractice.mockup.controls.control;
// Prepare the dir tree that we will be creating // Prepare the dir tree that we will be creating

@ -0,0 +1,30 @@
---
jsonUrl: '/jsons/best-practices/backend-performance.json'
pdfUrl: '/pdfs/best-practices/backend-performance.pdf'
order: 1
briefTitle: 'Backend Performance'
briefDescription: 'Backend Performance Best Practices'
isNew: true
isUpcoming: false
title: 'Backend Performance Best Practices'
description: 'Detailed list of best practices to improve your backend performance'
dimensions:
width: 968
height: 1860.38
schema:
headline: 'Backend Performance Best Practices'
description: 'Detailed list of best practices to improve the backend performance of your website. Each best practice carries further details and how to implement that best practice.'
imageUrl: 'https://roadmap.sh/best-practices/backend-performance.png'
datePublished: '2023-01-23'
dateModified: '2023-01-23'
seo:
title: 'Backend Performance Best Practices'
description: 'Detailed list of best practices to improve the backend performance of your website. Each best practice carries further details and how to implement that best practice.'
keywords:
- 'backend performance'
- 'api performance'
- 'backend performance best practices'
- 'backend performance checklist'
- 'backend checklist'
- 'make performant backends'
---
Loading…
Cancel
Save