Memahami pembacaan dan penulisan dalam skala besar
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Hanya berlaku untuk edisi Cloud Firestore Enterprise.
Baca dokumen ini untuk membuat keputusan yang tepat dalam merancang aplikasi Anda
demi menghasilkan performa dan keandalan yang tinggi. Dokumen ini berisi topik Cloud Firestore
lanjutan. Jika Anda baru mulai menggunakan Cloud Firestore,
lihat panduan memulai. Agar aplikasi Anda terus memiliki performa yang baik seiring
bertambahnya ukuran database dan traffic, sebaiknya pahami mekanisme
pembacaan dan penulisan di backend Firestore. Anda juga harus memahami
interaksi operasi baca dan tulis dengan lapisan penyimpanan dan batasan pokok
yang dapat memengaruhi performa.
Untuk mempelajari beberapa praktik terbaik sebelum merancang aplikasi, baca
bagian berikut:
Semua operasi tulis
ditangani sebagai transaksi baca-tulis untuk memastikan properti ACID. Jika operasi tulis
melibatkan beberapa pemisahan, operasi ini mungkin memerlukan proses commit dua fase.
Secara default, Operasi baca
"sangat konsisten" dan menggunakan pendekatan berbasis stempel waktu untuk
menghindari penguncian.
Untuk mempertahankan performa tinggi, Anda harus menghindari hotspot
dengan mendistribusikan operasi di seluruh rentang kunci dan menjaga transaksi tetap kecil.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-02 UTC."],[],[],null,["\u003cbr /\u003e\n\n\n|--------------------------------------------------------|\n| *Relevant to Cloud Firestore Enterprise edition only.* |\n\n\u003cbr /\u003e\n\nRead this document to make informed decisions on architecting your applications\nfor high performance and reliability. This document includes advanced\nCloud Firestore topics. If you're just starting out with Cloud Firestore,\nsee the [quickstart guide](/docs/firestore/enterprise/create-and-query-database)\ninstead. To make sure that your applications continue to perform well as your\ndatabase size and traffic increase, it helps to understand the mechanics of\nreads and writes in the Firestore backend. You must also understand the\ninteraction of your read and writes with the storage layer and the underlying\nconstraints that may affect performance.\n\nTo learn about some best practices before architecting your application, read\nthe following:\n\n- Understand the [high level components](https://cloud.google.com/firestore/mongodb-compatibility/docs/understand-reads-writes-scale#understand_the_high_level_components) of an API request.\n- All [writes](https://cloud.google.com/firestore/mongodb-compatibility/docs/understand-reads-writes-scale#understand_the_life_of_a_write) are handled as read-write transactions to ensure ACID properties. If a write involves multiple splits, it may require a two-phase commit process.\n- [Reads](https://cloud.google.com/firestore/mongodb-compatibility/docs/understand-reads-writes-scale#understand_the_life_of_a_read), by default, are \"strongly consistent\" and use a timestamp-based approach to avoid locks.\n- To maintain high performance, you should [avoid hotspots](https://cloud.google.com/firestore/mongodb-compatibility/docs/understand-reads-writes-scale#avoid_hotspots) by distributing operations across the key range and keeping transactions small."]]