- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想要一个 aerospike-server 节点的多个实例,以便负载平衡,因为我用太多请求访问了服务器,我收到一条错误消息,提示“错误代码 22:此时不允许操作”。
我假设有更多的 aerospike-server 节点,我可以减轻一个节点上的负载,从而完成更多的操作?我只是不确定从哪里开始。
我需要在一台主机上的所有本地节点。任何帮助都会很棒。
我的网络知识不是很好,所以请原谅我
我的 DockerFile:
FROM aerospike/aerospike-server
MAINTAINER "xxxx"
ADD aerospike.conf /etc/aerospike/
version: "3"
services:
aerospike-server:
image: amc
container_name: aerospike-server
ports:
- "3000:3000"
- "3001:3001"
- "3002:3002"
- "3003:3003"
aerospike-amc:
image: mrbar42/aerospike-amc
container_name: aerospike-amc
ports:
- "8081:8081"
network {
service {
address any
port 3000
# Uncomment the following to set the `access-address` parameter to the
# IP address of the Docker host. This will the allow the server to correctly
# publish the address which applications and other nodes in the cluster to
# use when addressing this node.
# access-address <IPADDR>
}
heartbeat {
# mesh is used for environments that do not support multicast
mode mesh
port 3002
# use asinfo -v 'tip:host=<ADDR>;port=3002' to inform cluster of
# other mesh nodes
interval 150
timeout 10
}
fabric {
# address any
port 3001
}
info {
# address any
port 3003
}
}
最佳答案
您可以使用多播心跳配置,并在一台机器上运行一小群 aerospike 节点。
以下是我使用的步骤:
1) 从 aerospike repo 获取最新的 Dockerfile
git 克隆 https://github.com/aerospike/aerospike-server.docker.git
2)修改心跳部分,使用组播:
heartbeat {
mode multicast
multicast-group 239.1.99.2
port 9918
interval 150
timeout 10
}
cat makecluster.sh
docker build -t "aerospike/aerospike-server" .
for i in {3..9} ; do
echo $i;
docker stop aerospike${i}
docker rm aerospike${i}
docker run -tid --name aerospike${i} -p ${i}000:3000 -p ${i}001:3001 -p ${i}002:3002 -p ${i}003:3003 aerospike/aerospike-server
done;
./makecluster.sh
Sending build context to Docker daemon 12.8 kB
Step 1/10 : FROM ubuntu:xenial
---> 2fa927b5cdd3
Step 2/10 : ENV AEROSPIKE_VERSION 3.12.1
---> Using cache
---> f9740fe0e5b5
Step 3/10 : ENV AEROSPIKE_SHA256 16ceb0d131892c3caab31ee031f7e37d7a611c22686fec2692facde87ac69a00
---> Using cache
---> 5e7fbc820f7a
Step 4/10 : RUN apt-get update -y && apt-get install -y wget python python-argparse python-bcrypt python-openssl logrotate net-tools iproute2 iputils-ping && wget "https://www.aerospike.com/artifacts/aerospike-server-community/${AEROSPIKE_VERSION}/aerospike-server-community-${AEROSPIKE_VERSION}-ubuntu16.04.tgz" -O aerospike-server.tgz && echo "$AEROSPIKE_SHA256 *aerospike-server.tgz" | sha256sum -c - && mkdir aerospike && tar xzf aerospike-server.tgz --strip-components=1 -C aerospike && dpkg -i aerospike/aerospike-server-*.deb && dpkg -i aerospike/aerospike-tools-*.deb && mkdir -p /var/log/aerospike/ && mkdir -p /var/run/aerospike/ && rm -rf aerospike-server.tgz aerospike /var/lib/apt/lists/* && dpkg -r wget ca-certificates && dpkg --purge wget ca-certificates && apt-get purge -y
---> Using cache
---> a1d797e088fa
Step 5/10 : COPY aerospike.conf /etc/aerospike/aerospike.conf
---> Using cache
---> 7bb9f5326c7b
Step 6/10 : COPY entrypoint.sh /entrypoint.sh
---> Using cache
---> 345534f6c3b8
Step 7/10 : VOLUME /opt/aerospike/data
---> Using cache
---> 3f07a5e4b113
Step 8/10 : EXPOSE 3000 3001 3002 3003
---> Using cache
---> e081dff6a725
Step 9/10 : ENTRYPOINT /entrypoint.sh
---> Using cache
---> 923ff0299e70
Step 10/10 : CMD asd
---> Using cache
---> a05c71468897
Successfully built a05c71468897
3
aerospike3
aerospike3
4d2df0569581c967d29750a5f7f6e67fc1835e1f6b78157eb5c8b11f843a222b
4
aerospike4
aerospike4
3173f06d9012996ce318855d982fbc20c5985beb7e356863a0075ce3ae337b21
5
aerospike5
aerospike5
10592f8ca508c678cd67695402f3c23ad417716772cf5a20de91c3e178bb1c28
6
aerospike6
aerospike6
7ddac9e31db5b618114c155b40d8ad524b629e96c514837a36854cf420a29d5c
7
aerospike7
aerospike7
6168421deffead460ac238b2a9817769e29d3c68eca33863cf9b0e19a8c09a0f
8
aerospike8
aerospike8
9d1761592c30b1460c064ef06f70067217e1b1c61f3efc2b016113b4869cfc6f
9
aerospike9
aerospike9
67c37f2f6ebae065eef978dcf4683b6ad5bd18bed0411e3d6681c723776c1834
docker exec -ti aerospike7 asadm
Aerospike Interactive Shell, version 0.1.9
Found 7 nodes
Online: 172.17.0.2:3000, 172.17.0.8:3000, 172.17.0.3:3000, 172.17.0.4:3000, 172.17.0.7:3000, 172.17.0.6:3000, 172.17.0.5:3000
Admin>
Admin> info
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Network Information~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Node Node Ip Build Cluster Cluster Cluster Principal Rackaware Client Uptime
. Id . . Size Key Integrity . Mode Conns .
172.17.0.2:3000 BB9020011AC4202 172.17.0.2:3000 C-3.12.1 7 8DBD43898C508D41 True BB9080011AC4202 none 7 00:06:03
172.17.0.3:3000 BB9030011AC4202 172.17.0.3:3000 C-3.12.1 7 8DBD43898C508D41 True BB9080011AC4202 none 8 00:06:02
172.17.0.4:3000 BB9040011AC4202 172.17.0.4:3000 C-3.12.1 7 8DBD43898C508D41 True BB9080011AC4202 none 8 00:06:00
172.17.0.5:3000 BB9050011AC4202 172.17.0.5:3000 C-3.12.1 7 8DBD43898C508D41 True BB9080011AC4202 none 6 00:05:58
172.17.0.7:3000 BB9070011AC4202 172.17.0.7:3000 C-3.12.1 7 8DBD43898C508D41 True BB9080011AC4202 none 10 00:05:55
172.17.0.8:3000 *BB9080011AC4202 172.17.0.8:3000 C-3.12.1 7 8DBD43898C508D41 True BB9080011AC4202 none 6 00:05:52
6168421deffe:3000 BB9060011AC4202 172.17.0.6:3000 C-3.12.1 7 8DBD43898C508D41 True BB9080011AC4202 none 8 00:05:56
Number of rows: 7
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Namespace Information~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Namespace Node Avail% Evictions Master Replica Repl Stop Pending Disk Disk HWM Mem Mem HWM Stop
. . . . (Objects,Tombstones) (Objects,Tombstones) Factor Writes Migrates Used Used% Disk% Used Used% Mem% Writes%
. . . . . . . . (tx,rx) . . . . . . .
test 172.17.0.2:3000 99 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) 2 false (0.000 ,0.000 ) 0.000 B 0 50 0.000 B 0 60 90
test 172.17.0.3:3000 99 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) 2 false (0.000 ,0.000 ) 0.000 B 0 50 0.000 B 0 60 90
test 172.17.0.4:3000 99 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) 2 false (0.000 ,0.000 ) 0.000 B 0 50 0.000 B 0 60 90
test 172.17.0.5:3000 99 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) 2 false (0.000 ,0.000 ) 0.000 B 0 50 0.000 B 0 60 90
test 172.17.0.7:3000 99 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) 2 false (0.000 ,0.000 ) 0.000 B 0 50 0.000 B 0 60 90
test 172.17.0.8:3000 99 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) 2 false (0.000 ,0.000 ) 0.000 B 0 50 0.000 B 0 60 90
test 6168421deffe:3000 99 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) 2 false (0.000 ,0.000 ) 0.000 B 0 50 0.000 B 0 60 90
test 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) (0.000 ,0.000 ) 0.000 B 0.000 B
Number of rows: 8
cat makecluster.sh
docker build -t "aerospike/aerospike-server" .
for i in {6..9} ; do
echo $i;
docker stop aerospike${i}
docker rm aerospike${i}
docker run -tid --name aerospike${i} -v /root/docker/aerospike-server.docker/aerospike${i}:/etc/aerospike --network host -p ${i}000:${i}000 -p ${i}001:${i}001 -p ${i}002:${i}002 -p ${i}003:${i}003 aerospike/aerospike-server
done;
cat aerospike7/aerospike.conf
# Aerospike database configuration file.
# This stanza must come first.
service {
user root
group root
paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
pidfile /var/run/aerospike/asd.pid
service-threads 4
transaction-queues 4
transaction-threads-per-queue 4
proto-fd-max 15000
}
logging {
# Log file must be an absolute path.
file /var/log/aerospike/aerospike.log {
context any info
}
# Send log messages to stdout
console {
context any info
}
}
network {
service {
# Add interface name for network card used by host
address br0
# Modify port to be used by your aerospike container
port 7000
# Uncomment the following to set the `access-address` parameter to the
# IP address of the Docker host. This will the allow the server to correctly
# publish the address which applications and other nodes in the cluster to
# use when addressing this node.
# access-address <IPADDR>
}
heartbeat {
mode multicast
multicast-group 239.1.99.2
port 9918
interval 150
timeout 10
}
fabric {
# Modify port to be used by your aerospike container
port 7001
}
info {
# Modify port to be used by your aerospike container
port 7003
}
}
namespace test {
replication-factor 2
memory-size 1G
default-ttl 5d # 5 days, use 0 to never expire/evict.
# storage-engine memory
# To use file storage backing, comment out the line above and use the
# following lines instead.
storage-engine device {
file /opt/aerospike/data/test.dat
filesize 4G
data-in-memory true # Store data in memory in addition to file.
}
}
asadm -p 7000
Aerospike Interactive Shell, version 0.1.9
Found 4 nodes
Online: 192.168.100.148:9000, 192.168.100.148:7000, 192.168.100.148:8000, 192.168.100.148:6000
Admin> info
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Network Information~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Node Node Ip Build Cluster Cluster Cluster Principal Rackaware Client Uptime
. Id . . Size Key Integrity . Mode Conns .
node.local:6000 177160DE04CA0568 192.168.120.148:6000 C-3.12.1 4 5009B1D835FA3C06 True 232960DE04CA0568 none 3 00:28:37
node.local:7000 1B5960DE04CA0568 192.168.120.148:7000 C-3.12.1 4 5009B1D835FA3C06 True 232960DE04CA0568 none 3 00:28:34
node.local:8000 1F4160DE04CA0568 192.168.120.148:8000 C-3.12.1 4 5009B1D835FA3C06 True 232960DE04CA0568 none 3 00:28:30
node.local:9000 *232960DE04CA0568 192.168.120.148:9000 C-3.12.1 4 5009B1D835FA3C06 True 232960DE04CA0568 none 4 00:28:25
Number of rows: 4
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Namespace Information~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Namespace Node Avail% Evictions Master Replica Repl Stop Pending Disk Disk HWM Mem Mem HWM Stop
. . . . (Objects,Tombstones) (Objects,Tombstones) Factor Writes Migrates Used Used% Disk% Used Used% Mem% Writes%
. . . . . . . . (tx,rx) . . . . . . .
test node.local:6000 99 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) 2 false (0.000 ,0.000 ) 0.000 B 0 50 0.000 B 0 60 90
test node.local:7000 99 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) 2 false (0.000 ,0.000 ) 0.000 B 0 50 0.000 B 0 60 90
test node.local:8000 99 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) 2 false (0.000 ,0.000 ) 0.000 B 0 50 0.000 B 0 60 90
test node.local:9000 99 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) 2 false (0.000 ,0.000 ) 0.000 B 0 50 0.000 B 0 60 90
test 0.000 (0.000 ,0.000 ) (0.000 ,0.000 ) (0.000 ,0.000 ) 0.000 B 0.000 B
关于docker - docker 上的多个 aerospike 节点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43701046/
我正在使用 JavaFX 8 创建一个应用程序。我使用拖/放动态更改网格 Pane 的内容。我希望每行或每行/列迭代 GridPane 内容。JavaFX 允许通过指定行和列在 GridPane 中添
我正在尝试将图像拖放到div上。图像没有被拖到div上并给出以下错误 Uncaught TypeError: Failed to execute 'appendChild' on 'Node': pa
我正在 android studio 中创建内部构建 AR 导航。我正在寻找一种方法将 anchor 与其他 anchor 或 anchor 节点/节点“连接”起来。我不确定使用哪一个。基于我将强制用
我在 Hive 上运行一些作业:首先是 4 节点,然后是 2 节点。令我惊讶的是,我的 2 节点性能比我的 4 节点更好。 首先,我在一个 4 节点(4 个事件节点)上运行查询,然后关闭 2 个节点(
我有 Node* current ,我在其中存储指向列表“顶部”当前节点的指针。当我将一个新节点设置为当前节点时,出现错误: '=' : cannot convert from 'CircularDo
我是 dcos Mesos 的新手,在本地 Ubuntu 机器上安装了 dc os。 我可以查看 dcos 仪表板。 但我无法使用 dcos node ssh --master-proxy --lea
在 JavaFX 中,是否有类似 setLayout(); 的东西?或 setBounds(); ? 例如,我想将按钮定位到我想要的位置。 最佳答案 JavaFX 场景图上的所有内容都是 Node .
我正在开发一个 JavaFX 应用程序,其中我开发的类(从 javafx.scene.Parent 扩展)是根据用户在 ListView 控件中单击的条目动态创建的。 只是要清楚这个节点,它不是使用像
我正在尝试为节点-边缘关系创建一个类图,因为它可以在有向图中找到。我想传达的是,Nodes 引用了 Edges,Edges 也引用了 Nodes。每个 Edge 都恰好需要两个 Node(源和目标)。
在mapreduce作业期间,单个任务将在随机节点上运行,是否有任何方法限制应在其中运行任务的节点? 最佳答案 Hadoop不会选择节点来随机运行任务。考虑到数据局部性,否则将有很多网络开销。 任务与
有什么区别: a) nodetool 重建 b) nodetool 修复 [-pr] 换句话来说,各个命令到底是做什么的? 最佳答案 nodetool重建:类似于引导过程(当您向集群添加新节点时),但
我已将第一个 OneToMany 关系添加到我的 hibernate 3.6.10 项目中。这是一个类: /** * */ package com.heavyweightsoftware.leal
是否有可能找到正在监听触发当前函数的事件的元素? 在下面的代码中,event.target 返回 #xScrollPane 和 event.currentTarget 和 event 的最低子节点.f
我正在尝试覆盖我数据库中的一些数据。结构很简单,就是: recipes { user_1{ recipe_1{data} recipe_2{data} } user_2{
我使用 setInterval 来运行该函数,但它会多次执行函数 2... 如何在输入中插入一个值后执行函数 第一个输入与其余输入的距离不同 如何在插入 val(tab 选项)后将插入从 1 个输入移
我不知道代码有什么问题,但在 visual studio 中不断收到这些错误消息。 Error 18 error C1903: unable to recover from previous e
我正在尝试从其类中获取 SharePoint 搜索导航节点的对象。 var nodes = $("div.ms-qSuggest-listItem"); 我正在获取节点对象,现在想要获取“_promp
D:\nodeP>node main.js module.js:327 抛出错误; ^ 错误:在 Function.Module 的 Function.Module._resolveFilename
struct node{ int key, prior, cnt, val; node *l, *r; node(){} node(int nkey) : key(nkey),
我有以下代码使用迭代器将项目插入双链表。这就是我们被要求这样做的方式。代码有效,但问题是我有 24 字节的绝对内存泄漏。 NodeIterator insert(NodeIterator & itrP
我是一名优秀的程序员,十分优秀!