【发布时间】:2021-03-23 12:49:53
【问题描述】:
目前,我们在 AWS 中使用 Apache Ignite Image 和 16 RAM 托管 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 自动缩放?
【问题讨论】:
-
这里有两个问题,第一个是你需要调整你的 Java 内存设置,如果它内存不足而只使用了 40% 的 RAM。第二个是您需要在内存使用量超过某个阈值时配置 AWS 自动扩展。这是否直接在 AWS EC2 上运行?还是 EC2 上的 ECS? Fargate 上的 ECS? EKS?
标签: amazon-web-services ignite