Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Anda dapat menjalankan aplikasi di App Engine menggunakan lingkungan fleksibel App Engine atau lingkungan standar App Engine. Anda juga dapat memilih untuk menggunakan kedua lingkungan secara simultan untuk aplikasi Anda dan memungkinkan layanan Anda memanfaatkan tiap-tiap manfaat di setiap lingkungan.
Lingkungan App Engine
App Engine sangat cocok untuk aplikasi yang didesain menggunakan arsitektur microservice, terutama jika Anda memutuskan untuk menggunakan kedua lingkungan tersebut. Gunakan bagian berikut untuk mempelajari dan memahami lingkungan mana yang paling sesuai dengan kebutuhan aplikasi Anda.
Kapan harus memilih lingkungan standar
Instance aplikasi berjalan di sandbox, menggunakan lingkungan runtime dari bahasa yang didukung yang tercantum di bawah ini.
Aplikasi yang perlu menangani penskalaan yang cepat.
Lingkungan standar optimal untuk aplikasi dengan karakteristik berikut:
Dimaksudkan untuk dijalankan secara gratis atau dengan biaya yang sangat rendah, Anda hanya membayar sesuai kebutuhan Anda dan saat Anda membutuhkannya. Misalnya, aplikasi Anda dapat menskalakan hingga 0 instance saat tidak ada traffic.
Mengalami lonjakan traffic yang tiba-tiba dan ekstrem yang memerlukan penskalaan langsung.
Kapan harus memilih lingkungan fleksibel
Instance aplikasi berjalan di dalam container Docker di virtual machine (VM) Compute Engine.
Aplikasi yang menerima traffic yang konsisten, mengalami fluktuasi traffic yang teratur, atau memenuhi parameter untuk meningkatkan dan menurunkan skala secara bertahap.
Lingkungan fleksibel tersebut optimal untuk aplikasi dengan karakteristik berikut:
Berjalan di container Docker yang menyertakan runtime atau kode sumber kustom yang ditulis dalam bahasa pemrograman lain.
Menggunakan atau bergantung pada framework yang menyertakan kode native.
Mengakses resource atau layanan project Google Cloud Anda yang berada di jaringan Compute Engine.
Membandingkan fitur umum
Tabel berikut merangkum perbedaan antara kedua lingkungan tersebut:
Membandingkan lingkungan fleksibel dengan Compute Engine
Lingkungan fleksibel App Engine memiliki perbedaan berikut dibandingkan dengan Compute Engine:
Instance VM lingkungan fleksibel dimulai ulang setiap minggu. Selama memulai ulang, layanan pengelolaan Google menerapkan update keamanan dan sistem operasi yang diperlukan.
Anda selalu memiliki akses root ke instance VM Compute Engine. Secara default, akses SSH ke instance VM di lingkungan fleksibel dinonaktifkan. Jika mau, Anda dapat mengaktifkan akses root ke instance VM aplikasi Anda.
Deployment kode dapat memerlukan waktu lebih lama karena image container dibangun menggunakan layanan Cloud Build.
Region geografis dari instance VM lingkungan fleksibel ditentukan berdasarkan lokasi yang Anda tentukan untuk aplikasi App Engine dari projectGoogle Cloud Anda. Layanan pengelolaan Google memastikan bahwa instance VM ditempatkan bersama untuk performa yang optimal.
Bermigrasi dari lingkungan standar ke lingkungan fleksibel
Jika memiliki aplikasi di lingkungan standar, Anda mungkin ingin memindahkan beberapa layanan ke lingkungan fleksibel. Untuk mengetahui panduan, lihat rekomendasi di perbandingan lingkungan.
Jika Anda baru menggunakan Google Cloud, buat akun untuk mengevaluasi performa lingkungan standar Ruby dalam skenario dunia nyata. Pelanggan baru mendapatkan kredit gratis senilai $300 untuk menjalankan, menguji, dan men-deploy workload.
[[["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-11 UTC."],[[["\u003cp\u003eApp Engine offers both a standard and a flexible environment for running applications, allowing you to choose or combine environments to suit your needs.\u003c/p\u003e\n"],["\u003cp\u003eThe standard environment is ideal for applications requiring rapid scaling and cost-effectiveness, especially when dealing with sudden traffic spikes and the ability to scale down to zero instances.\u003c/p\u003e\n"],["\u003cp\u003eThe flexible environment, which uses Docker containers on Compute Engine VMs, is best for applications needing custom runtimes, native code, or access to the Compute Engine network, and is optimal for consistent or fluctuating traffic.\u003c/p\u003e\n"],["\u003cp\u003eThe standard environment features faster deployment and instance startup times, while the flexible environment allows for more customization and supports features like SSH debugging and background processes.\u003c/p\u003e\n"],["\u003cp\u003eYou can migrate services from the standard to the flexible environment, and there are key differences to consider between using the flexible environment versus using Compute Engine directly.\u003c/p\u003e\n"]]],[],null,["# Choose an App Engine environment\n\nYou can run your applications in App Engine by using the\n[App Engine flexible environment](/appengine/docs/flexible) or the\n[App Engine standard environment](/appengine/docs/standard). You can also choose to\nsimultaneously use both environments for your application and allow your\nservices to take advantage of each environment's individual benefits.\n\nApp Engine environments\n-----------------------\n\nApp Engine is well suited to applications that are designed using a\n[microservice](https://wikipedia.org/wiki/Microservices)\narchitecture, especially if you decide to utilize both environments. Use the\nfollowing sections to learn and understand which environment best meets your\napplication's needs. \n\n### When to choose the standard environment\n\n\nApplication instances run in a\n[sandbox](https://en.wikipedia.org/wiki/Sandbox_(computer_security)),\nusing the runtime environment of a supported language listed below.\n\n\nApplications that need to deal with rapid scaling.\n\n\nThe standard environment is optimal for applications with the following\ncharacteristics:\n\n- Intended to **run for free or at very low cost**, where you pay only for what you need and when you need it. For example, your application can scale to 0 instances when there is no traffic.\n- Experiences **sudden and extreme spikes of traffic** which require immediate scaling. \n\n### When to choose the flexible environment\n\n\nApplication instances run within Docker containers on Compute Engine\nvirtual machines (VM).\n\n\nApplications that receive consistent traffic, experience regular traffic\nfluctuations, or meet the parameters for scaling up and down gradually.\n\n\nThe flexible environment is optimal for applications with the following\ncharacteristics:\n\n- Runs in a Docker container that includes a custom runtime or source code written in **other programming languages**.\n- Uses or depends on frameworks that include **native code**.\n- Accesses the resources or services of your Google Cloud project that reside in the **Compute Engine network**.\n\nCompare high-level features\n---------------------------\n\nThe following table summarizes the differences between the two environments:\n\nAlso see the in-depth\n[comparison of the environments](/appengine/docs/flexible/flexible-for-standard-users).\n\nCompare App Engine and Cloud Run\n--------------------------------\n\nTo compare features and learn how to migrate to Cloud Run,\nsee [Compare App Engine and Cloud Run](/appengine/migration-center/run/compare-gae-with-run).\n\nCompare the flexible environment to Compute Engine\n--------------------------------------------------\n\nThe App Engine flexible environment has the following differences to\nCompute Engine:\n\n- The flexible environment VM instances are restarted on a weekly basis. During\n restarts, Google's management services apply any necessary operating system\n and security updates.\n\n- You always have root access to Compute Engine VM instances. By default, SSH\n access to the VM instances in the flexible environment is disabled. If you\n choose, you can enable root access to your app's VM instances.\n\n- Code deployments can take longer as container images are built by using the\n Cloud Build service.\n\n- The geographical region of a flexible environment VM instance\n is determined by the location that you specify for the\n [App Engine application](/appengine/docs/flexible/locations) of your\n Google Cloud project. Google's management services\n ensures that the VM instances are co-located for optimal performance.\n\nMigrate from the standard environment to the flexible environment\n-----------------------------------------------------------------\n\nIf you have an application in the standard environment, you might want to move\nsome services to the flexible environment. For guidance, see the recommendations\nfor in the\n[comparison of the environments](/appengine/docs/flexible/flexible-for-standard-users).\n\nTo migrate specific services for Python, Java, Go, and PHP, see [Migrate services from the standard environment to the flexible environment](/appengine/docs/flexible/migrating).\n\nTry it for yourself\n-------------------\n\n\nIf you're new to Google Cloud, create an account to evaluate how\nRuby standard environment performs in real-world\nscenarios. New customers also get $300 in free credits to run, test, and\ndeploy workloads.\n[Try Ruby standard environment free](https://console.cloud.google.com/freetrial)"]]