Skillpedia
النشر والسحابة (DevOps)48k · #4697

gcp-cloud-run

ما الذي تفعله

تساعد هذه المهارة على بناء تطبيقات على Google Cloud (GCP) تعمل دون الحاجة إلى إدارة الخوادم. تتعامل مع التطبيقات التي تستقبل الطلبات (الخدمات) والتطبيقات التي تستجيب للأحداث، مع تحسين زمن الاستجابة واستهلاك الموارد.

متى تستخدمها

  • ✓بناء خدمة ويب تعمل في السحابة.
  • ✓إنشاء برنامج يستجيب للإشعارات.
  • ✓تحسين سرعة تطبيقات السحابة.

رابط المهارة

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/gcp-cloud-run/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/gcp-cloud-run/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أنشئ خدمة سحابية لموقع التجارة الإلكترونية الخاص بي، تتوسع تلقائياً مع الزيادة في الطلب.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تصف تطبيقك كحزمة (صورة حاوية)، وتتولى Google Cloud Run تشغيلها وإدارة البنية التحتية. ويمكن ضبطها أيضاً للاستجابة للأحداث.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

GCP Cloud Run

Specialized skill for building production-ready serverless applications on GCP. Covers Cloud Run services (containerized), Cloud Run Functions (event-driven), cold start optimization, and event-driven architecture with Pub/Sub.

Detailed Guide

Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.

Calculate memory including /tmp usage

# cloudbuild.yaml
steps:
  - name: 'gcr.io/cloud-builders/gcloud'
    args:
      - 'run'
      - 'deploy'
      - 'my-service'
      - '--memory=1Gi'  # Include /tmp overhead
      - '--image=gcr.io/$PROJECT_ID/my-service'

Monitor memory usage

import psutil
import logging

def log_memory():
    memory = psutil.virtual_memory()
    logging.info(f"Memory: {memory.percent}% used, "
                f"{memory.available / 1024 / 1024:.0f}MB available")

Concurrency=1 Causes Scaling Bottlenecks

Severity: HIGH

Situation: Setting concurrency to 1 for request isolation

Symptoms: Auto-scaling creates many container instances. High latency during traffic spikes. Increased cold starts. Higher costs from more instances.

Why this breaks: Setting concurrency to 1 means each container handles only one request at a time. During traffic spikes:

  • 100 concurrent requests = 100 container instances
  • Each instance has cold start overhead
  • More instances = higher costs
  • Scaling takes time, requests queue up

This should only be used when:

  • Processing is truly single-threaded
  • Memory-heavy per-request processing
  • Using thread-unsafe libraries

Recommended fix:

When to Use

Use this skill when the request clearly matches the capabilities and patterns described above.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
الأسئلة الشائعة

ما هو «cold start»؟

هو الوقت الذي يحتاجه التطبيق لبدء التشغيل عندما يكون غير مستخدم ويستقبل طلباً جديداً.

ما هو «concurrency=1»؟

يعني أن كل نسخة من تطبيقك لا تستطيع معالجة إلا طلب واحد في كل مرة. وهذا قد يسبب بطئاً إذا وصلت طلبات كثيرة في وقت واحد.

ما هو Pub/Sub؟

هي خدمة من Google Cloud تتيح إرسال الرسائل واستقبالها بين أجزاء مختلفة من التطبيق، مما يسهّل التواصل والاستجابة للأحداث.

التفاصيل

الوصف الأصلي من المؤلف

Specialized skill for building production-ready serverless applications on GCP. Covers Cloud Run services (containerized), Cloud Run Functions (event-driven), cold start optimization, and event-driven architecture with Pub/Sub.

repo: sickn33/agentic-awesome-skills

الشعبية

نجوم GitHub
48k
الترتيب
#4697
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة