تحسين أداء الخلفية لتطبيقات الويب المستندة إلى المحتوى
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
بالنسبة إلى أي نوع من التوسيع، فكّر في بنية تطبيقك والتحسينات التي يمكن أن تكون ممكنة. على سبيل المثال، يجب عرض المحتوى الثابت
من شبكات عرض المحتوى المحسَّنة
التي تقدّم مزايا السعر والأداء. قد يؤدي أيضًا التخزين المؤقت الإضافي للخلفية
لتخزين البيانات
إلى تحسين الأداء وتقليل متطلبات التوسع المكلف.
يمكن لقياس الأداء واختبار الأداء تحديد عوائق الأداء المحتملة خلال التطوير والمساعدة في تتبع الاتجاهات بمرور الوقت ودعم اتخاذ القرار من خلال مقارنة البُنى الأساسية أو مجموعات التكنولوجيا أو مقدمي الخدمات السحابية
أو الخيارات الأخرى.
اختبار التحميل يستخدم أنواع التحميل أو عدد الزيارات أو البيانات المحددة مسبقًا والخاضعة للرقابة
لقياس أداء الخلفية في مقابل أهدافك. يمكنك معرفة مدى تأثير مستويات
التحميل المختلفة في أداء تطبيقك.
يركز اختبار قابلية التوسع على تحليل قدرة تطبيقك
على توسيع نطاقه وتوسيع نطاقه. يعرض اختبار قابلية التوسع طريقة استجابة تطبيقك للتحميلات المتزايدة وكيفية تكييف الخلفية (بما في ذلك تخزين البيانات).
حدد أهدافًا واضحة قبل البدء في قياس أداء التطبيق، بما في ذلك الأداء والسرعة (على سبيل المثال، وقت الاستجابة وسرعة معالجة البيانات والسرعة) واستخدام الموارد (استخدام وحدة المعالجة المركزية (CPU) واستخدام الذاكرة وحركة بيانات الشبكة بين مكونات الخلفية) والتكلفة. ضع في اعتبارك أي تأخير في التوسيع؛ على سبيل المثال، إذا كان التطبيق يحتاج إلى توسيع نطاق ما يتجاوز مجموعة مخصصة من الموارد "الاحتياطية" عند حدوث حدوث انفجارات أو ارتفاعات كبيرة في عدد الزيارات.
وتتوفر العديد من الأدوات لأغراض قياس الأداء واختبار الأداء، مثل Apache JMeter وLocust. عند اختيار أداة اختبار، يجب مراعاة أنواع الاختبارات المتاحة، بما في ذلك ما إذا كنت بحاجة إلى دعم للبرمجة النصية أو تكاملات بيئة التطوير المتكاملة (IDE) لتصحيح الأخطاء أو المكونات الإضافية الإضافية أو الدعم لنوع عدد الزيارات والمقياس المراد اختباره.
في حال الاستعانة بأحد مقدّمي الخدمات السحابية، حدِّد ما إذا كانت هناك أي متطلبات إضافية أو
أفضل الممارسات لأي اختبار تحميل لتجنُّب القيود المحتملة. على سبيل المثال، ننصحك باتّباع أفضل الممارسات المتعلّقة بخدمة Cloud
Run.
في حين أن التوسع أمر ضروري لتحسين الأداء، فإن التقليص يجب أن يكون أيضًا
اعتبارات لتقليل التكلفة. ضع في اعتبارك التكلفة الأساسية لتطبيق الخلفية
بدون أي طلبات والتكلفة المتضمنة في توسيع نطاق
التطبيق.
قد تكون لديك تكاليف ثابتة للبُنى داخل المؤسسة أو المستندة إلى الخادم،
بغض النظر عن الاستخدام. تتيح لك بعض بيئات السحابة الإلكترونية تغيير مستوى الصوت إلى
صفر لتجنّب التكاليف عند عدم تقديم أي طلبات. يقدّم لك مقدّمو خدمات السحابة الإلكترونية حاسبات
لاستكشاف عمليات الضبط واستراتيجيات التسعير المختلفة،
مثل الالتزامات المسبقة للموارد.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eOptimize application architecture and utilize content delivery networks for static content to enhance performance and minimize scaling needs.\u003c/p\u003e\n"],["\u003cp\u003eBenchmarking and performance testing, including load and scalability testing, are crucial for identifying bottlenecks, tracking performance trends, and making informed decisions about scaling approaches.\u003c/p\u003e\n"],["\u003cp\u003eEstablish clear performance targets, encompassing speed, resource utilization, and cost, and account for potential scaling delays when planning your infrastructure.\u003c/p\u003e\n"],["\u003cp\u003eManage costs by scaling down resources when they are not needed, leveraging cloud provider tools to explore pricing strategies and potentially scaling to zero to minimize expenses during periods of inactivity.\u003c/p\u003e\n"]]],["Application architecture should be optimized for scaling, such as using content delivery networks for static content and caching for data storage. Benchmarking and performance testing, including load and scalability tests, are crucial for identifying bottlenecks. Define targets for performance, resource utilization, and cost. Choose testing tools like Apache JMeter or Locust, considering test types and provider requirements. Balance scaling up for performance with scaling down to minimize costs, exploring cloud options like \"scale to zero.\"\n"],null,["# Optimize backend performance for content-driven web apps\n\nFor any type of scaling, consider the architecture of your application and what\noptimizations may be possible. For example, [static content should be served\nfrom optimized content delivery networks](/solutions/content-driven/hosting/cdn)\nthat offer price and performance benefits. Additional [caching for the data\nstorage\nbackend](/solutions/content-driven/data-storage/performance-optimization#cache)\nmay also improve performance and minimize the requirements for expensive\nscaling.\n\nPerformance testing and benchmarks\n----------------------------------\n\nBenchmarking and performance testing can identify potential performance\nbottlenecks during development, help track trends over time, and support\ndecision making by comparing architectures, technology stacks, cloud providers,\nor other options.\n\n**Load testing** uses predetermined, controlled types of load, traffic, or data\nto measure the performance of your backend against your targets. You can see how\nvarious load levels impact your application's performance.\n\n**Scalability testing** focuses on analyzing your application's ability to\n[scale up and scale out](/solutions/content-driven/backend/scaling). Scalability\ntesting shows how your application responds to increased loads and how the\nbackend (including data storage) adapts.\n\nDefine clear targets before beginning to benchmark the application, including\nperformance and speed (for example latency, throughput, speed), resource\nutilization (CPU utilization, memory usage, network traffic between backend\ncomponents), and cost. Consider any delays in scaling; for example, if the\napplication needs to scale beyond an allocated set of \"reserve\" resources when\nbursts or spikes in traffic occur.\n\nMany tools are available for benchmarking and performance testing, such as\n[Apache JMeter](https://jmeter.apache.org/) and\n[Locust](https://locust.io/). When selecting a testing tool,\nconsider the types of tests that are available, including whether or not you\nneed support for scripting, IDE integrations for debugging, additional plug-ins,\nor support for the kind of traffic and scale to be tested.\n\nIf using a cloud provider, determine if there are any additional requirements or\nbest practices for any load testing to avoid potential restrictions. For\nexample, consider the best practices for [Cloud\nRun](https://cloud.google.com/run/docs/about-load-testing).\n\nCost and performance considerations\n-----------------------------------\n\nWhile scaling up is essential to improve performance, scaling down should also\nbe a consideration to minimize cost. Consider the baseline cost of your backend\napplication without any requests and the cost involved in scaling up the\napplication.\n\nYou may have fixed costs for on-premise or server-based architectures,\nregardless of utilization. Some cloud environments allow you to *\"scale to\nzero\"* to avoid costs when no requests are made. Cloud providers offer\ncalculators for you to explore different configurations and pricing strategies,\nsuch as pre-commitments for resources."]]