Jika Anda membuat fungsi baru, lihat Panduan Memulai Konsol di Cloud Run. Konten di halaman ini hanya berlaku untuk fungsi lama yang sudah ada yang dibuat dengan Cloud Functions v1 API.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Mengonfigurasi fungsi Cloud Run (generasi ke-1)
Gunakan halaman ini untuk memahami opsi konfigurasi yang tersedia di fungsi Cloud Run, cara mengontrol perilaku fungsi, dan praktik terbaik untuk setiap jenis konfigurasi.
Anda dapat menghindari cold start untuk aplikasi dan mengurangi latensi aplikasi dengan menetapkan jumlah minimum instance. Perhatikan bahwa penetapan jumlah minimum instance akan dikenakan biaya. Baca Menggunakan instance minimum untuk mempelajari lebih lanjut.
Rahasia
Anda dapat menggunakan Secret Manager dengan fungsi Cloud Run untuk menyimpan kunci API, sandi, dan informasi sensitif lainnya dengan aman. Lihat Menggunakan secret untuk mempelajari lebih lanjut.
Variabel lingkungan
Anda dapat membuat pasangan key/value untuk digunakan dengan fungsi Anda. Lihat Menggunakan variabel lingkungan untuk mempelajari lebih lanjut.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-19 UTC."],[[["\u003cp\u003eCloud Run functions offer configuration options to control their behavior and optimize performance.\u003c/p\u003e\n"],["\u003cp\u003eYou can limit the maximum number of instances to manage costs and prevent issues with high request volumes.\u003c/p\u003e\n"],["\u003cp\u003eSetting a minimum number of instances can help avoid cold starts and reduce latency, although it may increase costs.\u003c/p\u003e\n"],["\u003cp\u003eSensitive information like API keys can be securely managed using Secret Manager with Cloud Run functions.\u003c/p\u003e\n"],["\u003cp\u003eEnvironment variables can be used to configure key/value pairs within your functions.\u003c/p\u003e\n"]]],[],null,["# Configure Cloud Run functions (1st gen)\n=======================================\n\nUse this page to understand what configuration options are available in\nCloud Run functions, how to control the behavior of your functions, and what the\nbest practices are for each type of configuration.\n\nGuard against high request levels\n---------------------------------\n\nYou can control how many instances your function creates to serve requests.\nThis can help to curb costs and guard against\n[abnormally high request levels](/functions/1stgendocs/configuring/max-instances#limits_best_practices).\nSee [Using maximum instances](/functions/1stgendocs/configuring/max-instances)\nto learn more.\n\nAvoid cold starts and reduce latency\n------------------------------------\n\nYou can avoid cold starts for your application and reduce application latency by\nsetting a minimum number of instances. Note that setting a minimum number of\ninstances incurs cost. See\n[Using minimum instances](/functions/1stgendocs/configuring/min-instances) to learn\nmore.\n\nSecrets\n-------\n\nYou can use [Secret Manager](/secret-manager/docs#docs) with your\nCloud Run functions to securely store API keys, passwords, and other\nsensitive information. See\n[Using secrets](/functions/1stgendocs/configuring/secrets) to learn more.\n\nEnvironment variables\n---------------------\n\nYou can create key/value pairs for use with your function. See\n[Using environment variables](/functions/1stgendocs/configuring/env-var) to learn\nmore."]]