amazon-web-services - AWS (linux) 中的 Apache Ignite 自动缩放
问题描述
目前,我们在 AWS 中使用具有 16 个 RAM 的 Apache Ignite Image 托管 Apache Ignite 节点。我们希望在缓存负载增加的同时动态添加新节点。为此,我们需要以某种方式触发该节点将很快耗尽内存,我们需要添加额外的节点。有什么方法可以追踪吗?我尝试使用随机数据加载缓存,当 java 进程占用 30-40% 的 RAM 时,缓存失败并出现 OutOfMemoryException。这是来自 {IGNITE_HOME}\config 的 default-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
...
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="cacheConfiguration">
<list>
<!-- Partitioned cache example configuration (Atomic mode). -->
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="default"/>
<property name="atomicityMode" value="ATOMIC"/>
<property name="backups" value="1"/>
</bean>
</list>
</property>
<!-- Enabling Apache Ignite Persistent Store. -->
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="defaultDataRegionConfiguration">
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="persistenceEnabled" value="false"/>
<property name="metricsEnabled" value="true"/>
<property name="maxSize" value="#{10L * 1024 * 1024 * 1024}"/>
</bean>
</property>
</bean>
</property>
<!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">
<property name="awsCredentialsProvider" ref="aws.creds"/>
<property name="bucketName" value="dev-apache-ignite"/>
</bean>
</property>
</bean>
</property>
</bean>
<!-- AWS credentials. Provide your access key ID and secret access key. -->
<bean id="aws.creds" class="com.amazonaws.auth.InstanceProfileCredentialsProvider">
<constructor-arg value="false" />
</bean>
</beans>
抱歉,如果文档中已经回答了这个问题。是否有任何预定义的准则来为 ignite 配置 AWS 自动缩放?
解决方案
JVM 占用的 RAM 量无关紧要。当您用完数据区域时,您将看到 IgniteOutOfMemoryException - 在您的情况下为 10G。
您可以除以DataRegionMetrics.getOffheapUsedSize()
数据区域大小以了解您还剩下多少跑道。
然后您可能可以使用 GridGain K8S Operator 来扩展您的集群: https ://www.gridgain.com/docs/latest/installation-guide/operator/how-tos
推荐阅读
- javascript - Document、HTMLDocument、Document、Element、Node等,它们的关系是什么?
- c - C检查数组中是否存在空间,如果不重新分配更多空间?
- sql-server - Angular 客户端使用 Expressjs 从服务器收到 OK 作为 POST 请求的错误
- image - 如何从我的 Firebase 存储中获取图像文件
- javascript - SetAttribute 函数在 Chrome 浏览器中未按预期工作
- c++ - “未定义”变量和参数
- python - 使用python(numpy)更新线性回归(梯度下降)
- javascript - SameSite Cookie 属性警告未得到修复
- amazon-web-services - ECS 任务未启动 - 已停止(CannotPullContainerError:“来自守护程序请求的错误响应在等待连接时取消”
- ios - AWSCognitoIdentityMultiFactorAuthentication 永不返回