AWS Blu Age Runtime 中的可用 Redis 快取屬性 - AWS 大型主機現代化

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

AWS Blu Age Runtime 中的可用 Redis 快取屬性

您可以使用本文件來了解 AWS Blu Age Runtime 中的 Redis 快取,以及 Gapwalk 組態、支援的 Redis 屬性,以及application-main.yml檔案如何參考 Redis 快取的秘密 ARN。

Redis 快取在 AWS Blu Age Runtime 中

Redis 伺服器可用於 AWS Blu Age Gapwalk 應用程式中各種功能的快取,例如:

AWS 使用 Redis 快取的 Blu Age Runtime 功能

描述
Blusam 快取 Redis Blusam 快取,使用寫入落後策略來最佳化批次承載上遇到的寫入密集型工作負載,以有效率地讀取記錄。
Blusam 鎖定 資料集和記錄的分散式鎖定快取。
資料集目錄 目錄資料集快取。
工作階段快取 HttpSession 的 Redis 快取。快取會儲存使用者名稱、與角度前端對話的狀態,以及特定的「對話」 (BMS、MFS、AS400) 資訊。
工作階段追蹤器 具有相關聯使用者名稱和工作階段session-creation-time資訊的作用中工作階段快取。
JICS 快取 JICS 資源定義的快取。
TS 佇列 TS 佇列的儲存體。
JCL 檢查點 JCL 檢查點快取。
Gapwalk 檔案鎖定 依任務的分散式檔案鎖定快取。
Blu4iv 鎖定 Blu4iv 記錄鎖定的儲存體。

Redis Gapwalk 組態

如果指定 redis 做為快取機制,且未針對特定功能提供 Redis 組態,則會使用全域 Redis 組態。此組態可讓您同時針對多個 Redis 快取使用相同的組態。

在下列範例中,Blusam 資料集快取和 JICS 快取使用 gapwalk.redis(redis.server1) 組態,因為其快取類型設定為 redis,而且 JICS 資源定義和 下沒有指定隱含 Redis 屬性JICS 資源定義。不過,由於已明確定義其 Redis 屬性,因此 Blusam 鎖定快取將使用不同的 Redis 組態 (redis.server2)。

... gapwalk: redis: hostName: redis.server1 port: 6379 ... bluesam: # Redis bluesam cache cache: redis # Redis locks cache locks: cache: redis hostName: redis.server2 port: 6379 ... # Redis jics cache jics: resource-definitions: store-type: redis ...

若要啟用全域 Redis 組態,請在 中新增下列組態main-application.yml

gapwalk: redis: hostName: localhost port: 6379 mode: standalone # Optional username: # Optional password: "" # Optional useSsl: false # Optional database: 0 # Optional maxTotal: 128 # Optional maxIdle: 128 # Optional minIdle: 16 # Optional testOnBorrow: true # Optional testOnReturn: true # Optional testWhileIdle: true # Optional testOnCreate: true # Optional minEvictableIdleTimeMillis: 60000 # Optional timeBetweenEvictionRunsMillis: 30000 # Optional numTestsPerEvictionRun: -1 # Optional blockWhenExhausted: true # Optional nettyThreads: 32 # Optional subscriptionsPerConnection: 10 # Optional subscriptionConnectionPoolSize: 100 # Optional pageSizeInBytes: 8192 # Optional readTimeout: 2000 # Optional

支援的 Redis 屬性

下表顯示 AWS Blu Age Runtime 上全域和特定 Redis 快取支援的 Redis 屬性。

屬性名稱 是否為必要? 描述 預設
mode Redis 執行模式。 standalone | cluster standalone
hostname Redis 伺服器的主機名稱或 IP 地址。 string null
port Redis 伺服器接聽連線的連接埠號碼。 int null
username 身分驗證的使用者名稱。 string null
password 用於身分驗證的密碼。 string 空白字串
useSsl 指定是否啟用 Redis 連線的 SSL/TLS 加密。 boolean false
database 要使用的 Redis 資料庫號碼。Redis 支援多個邏輯資料庫,而此屬性會指定要使用哪個資料庫。 int 0
maxTotal Redis 連線集區中允許的連線數目上限。 int 128
maxIdle Redis 連線集區中允許的閒置連線數目上限。 int 128
minIdle 要在 Redis 連線集區中維護的閒置連線數目下限。 int 16
testOnBorrow 布林值,指出是否要在從集區借用連線之前驗證連線。 布林值 true
testOnReturn 布林值,指出是否要在將連線傳回至集區之前驗證連線。 布林值 true
testWhileIdle 布林值,指示是否定期驗證集區中的閒置連線。 布林值 true
testOnCreate 布林值,指出是否在建立連線時驗證連線。 布林值 true
minEvictableIdleTimeMillis 閒置連線必須保留在集區中才能移出的最短時間長度 (以毫秒為單位)。 long 60000L
timeBetweenEvictionRunsMillis 閒置連線偵測器執行緒連續執行之間的時間 (以毫秒為單位)。 long 30000L
numTestsPerEvictionRun 每次執行閒置連線偵測器執行緒時要測試的連線數目上限。 int -1
blockWhenExhausted 布林值,指出是否要在集區耗盡時封鎖和等待連線變成可用。 布林值 true
nettyThreads 用於處理 Redis 連線的 Netty 執行緒數量。 int 32
subscriptionsPerConnection 每個 Redis 連線允許的訂閱數量上限。 int 10
subscriptionConnectionPoolSize Redis 訂閱連線集區中允許的連線數目上限。 int 100
pageSizeInBytes Redis 操作的預設頁面大小,以位元組為單位。 long 262144000
readTimeout Redis 操作的讀取逾時,以毫秒為單位。 long 2000
timeToLiveMillis 快取項目在被視為過期和移除之前保留在快取中的持續時間 (以毫秒為單位)。如果未指定此屬性,快取項目預設不會自動過期。 long -1

Redis 快取屬性

Redis Blusam 快取

bluesam: cache: redis # If the following redis properties are not specified gapwalk.redis configuration will be used for this cache redis: hostName: localhost port: 6379 mode: standalone # Optional username: # Optional password: "" # Optional useSsl: false # Optional database: 0 # Optional maxTotal: 128 # Optional maxIdle: 128 # Optional minIdle: 16 # Optional testOnBorrow: true # Optional testOnReturn: true # Optional testWhileIdle: true # Optional testOnCreate: true # Optional minEvictableIdleTimeMillis: 60000 # Optional timeBetweenEvictionRunsMillis: 30000 # Optional numTestsPerEvictionRun: -1 # Optional blockWhenExhausted: true # Optional nettyThreads: 32 # Optional subscriptionsPerConnection: 10 # Optional subscriptionConnectionPoolSize: 100 # Optional pageSizeInBytes: 8192 # Optional readTimeout: 2000 # Optional timeToLiveMillis: 60000 # Optional

Redis Blusam 快取

bluesam: locks: cache: redis # If the following redis properties are not specified gapwalk.redis configuration will be used for this cache hostName: localhost port: 6379 mode: standalone # Optional username: # Optional password: "" # Optional useSsl: false # Optional database: 0 # Optional maxTotal: 128 # Optional maxIdle: 128 # Optional minIdle: 16 # Optional testOnBorrow: true # Optional testOnReturn: true # Optional testWhileIdle: true # Optional testOnCreate: true # Optional minEvictableIdleTimeMillis: 60000 # Optional timeBetweenEvictionRunsMillis: 30000 # Optional numTestsPerEvictionRun: -1 # Optional blockWhenExhausted: true # Optional nettyThreads: 32 # Optional subscriptionsPerConnection: 10 # Optional subscriptionConnectionPoolSize: 100 # Optional pageSizeInBytes: 8192 # Optional readTimeout: 2000 # Optional

工作階段快取

spring: session: store-type: redis # If the following redis properties are not specified gapwalk.redis configuration will be used for this cache jics: redis: hostName: localhost port: 6379 mode: standalone # Optional username: # Optional password: "" # Optional useSsl: false # Optional database: 0 # Optional maxTotal: 128 # Optional maxIdle: 128 # Optional minIdle: 16 # Optional testOnBorrow: true # Optional testOnReturn: true # Optional testWhileIdle: true # Optional testOnCreate: true # Optional minEvictableIdleTimeMillis: 60000 # Optional timeBetweenEvictionRunsMillis: 30000 # Optional numTestsPerEvictionRun: -1 # Optional blockWhenExhausted: true # Optional nettyThreads: 32 # Optional subscriptionsPerConnection: 10 # Optional subscriptionConnectionPoolSize: 100 # Optional pageSizeInBytes: 8192 # Optional readTimeout: 2000 # Optional

JICS 資源定義

jics: resource-definitions: store-type: redis # If the following redis properties are not specified gapwalk.redis configuration will be used for this cache redis: hostName: localhost port: 6379 mode: standalone # Optional username: # Optional password: "" # Optional useSsl: false # Optional database: 0 # Optional maxTotal: 128 # Optional maxIdle: 128 # Optional minIdle: 16 # Optional testOnBorrow: true # Optional testOnReturn: true # Optional testWhileIdle: true # Optional testOnCreate: true # Optional minEvictableIdleTimeMillis: 60000 # Optional timeBetweenEvictionRunsMillis: 30000 # Optional numTestsPerEvictionRun: -1 # Optional blockWhenExhausted: true # Optional nettyThreads: 32 # Optional subscriptionsPerConnection: 10 # Optional subscriptionConnectionPoolSize: 100 # Optional pageSizeInBytes: 8192 # Optional readTimeout: 2000 # Optional

JICS TS 佇列

jics: parameters: tsqimpl: redis # If the following redis properties are not specified gapwalk.redis configuration will be used for this cache queues: ts: redis: hostName: localhost port: 6379 mode: standalone # Optional username: # Optional password: "" # Optional useSsl: false # Optional database: 0 # Optional maxTotal: 128 # Optional maxIdle: 128 # Optional minIdle: 16 # Optional testOnBorrow: true # Optional testOnReturn: true # Optional testWhileIdle: true # Optional testOnCreate: true # Optional minEvictableIdleTimeMillis: 60000 # Optional timeBetweenEvictionRunsMillis: 30000 # Optional numTestsPerEvictionRun: -1 # Optional blockWhenExhausted: true # Optional nettyThreads: 32 # Optional subscriptionsPerConnection: 10 # Optional subscriptionConnectionPoolSize: 100 # Optional pageSizeInBytes: 8192 # Optional readTimeout: 2000 # Optional

工作階段追蹤器

session-tracker: store-type: redis # If the following redis properties are not specified gapwalk.redis configuration will be used for this cache redis: hostName: localhost port: 6379 mode: standalone # Optional username: # Optional password: "" # Optional useSsl: false # Optional database: 0 # Optional maxTotal: 128 # Optional maxIdle: 128 # Optional minIdle: 16 # Optional testOnBorrow: true # Optional testOnReturn: true # Optional testWhileIdle: true # Optional testOnCreate: true # Optional minEvictableIdleTimeMillis: 60000 # Optional timeBetweenEvictionRunsMillis: 30000 # Optional numTestsPerEvictionRun: -1 # Optional blockWhenExhausted: true # Optional nettyThreads: 32 # Optional subscriptionsPerConnection: 10 # Optional subscriptionConnectionPoolSize: 100 # Optional pageSizeInBytes: 8192 # Optional readTimeout: 2000 # Optional

JCL 檢查點

jcl: checkpoint: provider: redis # If the following redis properties are not specified gapwalk.redis configuration will be used for this cache redis: hostname: localhost port: 6379 mode: standalone # Optional username: # Optional password: "" # Optional useSsl: false # Optional database: 0 # Optional maxTotal: 128 # Optional maxIdle: 128 # Optional minIdle: 16 # Optional testOnBorrow: true # Optional testOnReturn: true # Optional testWhileIdle: true # Optional testOnCreate: true # Optional minEvictableIdleTimeMillis: 60000 # Optional timeBetweenEvictionRunsMillis: 30000 # Optional numTestsPerEvictionRun: -1 # Optional blockWhenExhausted: true # Optional nettyThreads: 32 # Optional subscriptionsPerConnection: 10 # Optional subscriptionConnectionPoolSize: 100 # Optional pageSizeInBytes: 8192 # Optional readTimeout: 2000 # Optional

Gapwalk 檔案鎖定

filesLocks: enabled: true retryTime: 1000 MaxRetry: 5 provider: redis # If the following redis properties are not specified gapwalk.redis configuration will be used for this cache redis: hostName: localhost port: 6379 mode: standalone # Optional username: # Optional password: "" # Optional useSsl: false # Optional database: 0 # Optional pool: maxTotal: 128 # Optional maxIdle: 128 # Optional minIdle: 16 # Optional testOnBorrow: true # Optional testOnReturn: true # Optional testWhileIdle: true # Optional testOnCreate: true # Optional minEvictableIdleTimeMillis: 60000 # Optional timeBetweenEvictionRunsMillis: 30000 # Optional numTestsPerEvictionRun: -1 # Optional blockWhenExhausted: true # Optional nettyThreads: 32 # Optional subscriptionsPerConnection: 10 # Optional subscriptionConnectionPoolSize: 100 # Optional pageSizeInBytes: 8192 # Optional readTimeout: 2000 # Optional

Blu4iv 鎖定

blu4iv.lock: redis blu4iv.lock.timeout: 10 #(in millisecondes) # If the following redis properties are not specified gapwalk.redis configuration will be used for this cache blu4iv.lock.redis: hostName: localhost port: 6379 mode: standalone # Optional username: # Optional password: "" # Optional useSsl: false # Optional database: 0 # Optional maxTotal: 128 # Optional maxIdle: 128 # Optional minIdle: 16 # Optional testOnBorrow: true # Optional testOnReturn: true # Optional testWhileIdle: true # Optional testOnCreate: true # Optional minEvictableIdleTimeMillis: 60000 # Optional timeBetweenEvictionRunsMillis: 30000 # Optional numTestsPerEvictionRun: -1 # Optional blockWhenExhausted: true # Optional nettyThreads: 32 # Optional subscriptionsPerConnection: 10 # Optional subscriptionConnectionPoolSize: 100 # Optional pageSizeInBytes: 8192 # Optional readTimeout: 2000 # Optional

資料集目錄

datasimplifier: catalogImplementation: redis # If the following redis properties are not specified gapwalk.redis configuration will be used for this cache redis: hostName: localhost port: 6379 mode: standalone # Optional username: # Optional password: "" # Optional useSsl: false # Optional database: 0 # Optional maxTotal: 128 # Optional maxIdle: 128 # Optional minIdle: 16 # Optional testOnBorrow: true # Optional testOnReturn: true # Optional testWhileIdle: true # Optional testOnCreate: true # Optional minEvictableIdleTimeMillis: 60000 # Optional timeBetweenEvictionRunsMillis: 30000 # Optional numTestsPerEvictionRun: -1 # Optional blockWhenExhausted: true # Optional nettyThreads: 32 # Optional subscriptionsPerConnection: 10 # Optional subscriptionConnectionPoolSize: 100 # Optional pageSizeInBytes: 8192 # Optional readTimeout: 2000 # Optional

Redis 快取的秘密管理員

application-main.yaml 檔案可以參考 Redis 快取的秘密 ARN。如需如何在執行時間整合 AWS Secrets Manager 以安全地擷取 Redis 連線詳細資訊的詳細資訊,請參閱 AWS Blu Age Runtime 秘密