Share via


在 Azure Spring Apps 中使用內建永續性記憶體

注意

Azure Spring Apps 是 Azure Spring Cloud 服務的新名稱。 雖然服務有新的名稱,但在我們努力更新資產,例如螢幕快照、影片和圖表時,您會在某些地方看到舊名稱一段時間。

本文適用於: ✔️ Java ✔️ C#

本文適用於: ✔️基本/標準 ❌ 企業

Azure Spring Apps 為您的應用程式提供兩種類型的內建記憶體:持續性和暫時性。

根據預設,Azure Spring Apps 會為每個應用程式實例提供暫存記憶體。 暫存記憶體限制為每個實例 5 GB,且 /tmp 作為預設掛接路徑。

警告

如果您重新啟動應用程式實例,則會永久刪除相關聯的暫存記憶體。

永續性記憶體是由 Azure 管理的檔案共用容器,且每個應用程式配置。 應用程式的所有實例都會共用儲存在永續性記憶體中的數據。 Azure Spring Apps 實例最多可以有 10 個已啟用永續性記憶體的應用程式。 每個應用程式都會配置 50 GB 的永續性記憶體。 持續性記憶體的預設掛接路徑是 /persistent

啟用或停用內建持續性記憶體

您可以使用 Azure 入口網站 或 Azure CLI 來啟用或停用內建持續性記憶體。

使用下列步驟,使用 Azure 入口網站 啟用或停用內建持續性記憶體。

  1. 移至 Azure 入口網站 中的 Azure Spring Apps 實例。

  2. 選取 [應用程式 ] 以檢視服務實例的應用程式,然後選取應用程式以顯示應用程式的 [概觀 ] 頁面。

    Screenshot of Azure portal showing the Apps page.

  3. 在 [概 觀] 頁面上,選取 [ 組態]。

    Screenshot of Azure portal showing details for an app.

  4. 在 [組態] 頁面上,選取 [持續性 儲存體]。

    Screenshot of Azure portal showing the Configuration page.

  5. 在 [持續性 儲存體] 索引標籤上,選取 [啟用] 以啟用永續性記憶體,或選取 [停用] 以停用永續性記憶體。

    Screenshot of Azure portal showing the Persistent Storage tab.

如果已啟用持續性記憶體,[持續性 儲存體] 索引卷標會顯示記憶體大小和路徑。

警告

如果您停用應用程式的永續性記憶體,則會解除分配所有該記憶體,而且所有儲存的數據都會永久遺失。

下一步