当前位置:网站首页>Metaq installation deployment document
Metaq installation deployment document
2022-06-28 17:08:00 【Brother Xing plays with the clouds】
One .MetaQ Installation and deployment :
place | IP | Broker ID | Master/Slave | Slave ID:Group |
|---|---|---|---|---|
Hefei | 192.168.52.23 | 1 | Slave | 1:meta-slave-group-hf |
Beijing | 192.168.51.33 | 1 | Master | / |
Guangzhou | 192.168.70.157 | 1 | Slave | 2:meta-slave-group-gz |
Two .MetaQ install
1. Premise
Already installed ZooKeeper Machine , And three places MetaQ You can access , Three IP Fine ping Through installation ZooKeeper Machine .ZooKeeper It's used to register MetaQ Of broker、topic、pub、sub Information , Used for load balancing , Play a coordinating role .
I have installed in all three places ZooKeeper, Beijing is currently used 192.168.51.33:2181 As ZooKeeper The server .
Zookeeper Use Ubuntu Of deb Bag dpkg Way to install .
start-up ZooKeeper:
Service zookeeper start
2. download MetaQserver 1.4.6.2
Download link :https://meta-queue.googlecode.com/files/metaq-server-1.4.6.2.tar.gz, download metaq-server-1.4.6.2.tar.gz Copy to three places /usr/lib Under the table of contents .
3. Deploy
decompression tar zxvfmetaq-server-1.4.6.2.tar.gz, unzipped taobao/metamorphosis-server-wrapper Folder move to /usr/lib Next , And rename to metaq.
Metaq File structure :
l bin: metaq Command folder for ./meteServer.sh perform metaq command
l conf:metaq Configuration folder ,async_slave.properties Asynchronous replication configuration ,server.ini To configure broker,samsa_master.properties Synchronous replication configuration .
l lib:metaq Rely on the jar package
l provided: Developers develop their own programs
4. master/slave colony To configure
Use asynchronous replication architecture .
Modify Beijing 192.168.51.33 Mechanical /usr/lib/metaq/conf/server.ini File for :
[system]
;; brokerId mustbe unique, the slave should be the same with master
brokerId=1
;; topicpartitions default set to 1, I changed it to 16, it should not be too large
numPartitions=16
serverPort=8123
dashboardHttpPort=8120
unflushThreshold=0
unflushInterval=10000
maxSegmentSize=1073741824
;default 1048576
maxTransferSize=104857600
deletePolicy=delete,168
deleteWhen=0 0 6,18 * * ?
flushTxLogAtCommit=1
stat=true
putProcessThreadCount=100
;; Update consumers offsets tocurrent max offsets when consumers offsets are out of range of current broker'smessages.
;; It must be false inproduction.But recommend to be true in development or test.
updateConsumerOffsets=true
;; your zookeeperserver
[zookeeper]
zk.zkConnect=192.168.51.33:2181
zk.zkSessionTimeoutMs=30000
zk.zkConnectionTimeoutMs=30000
zk.zkSyncTimeMs=5000
;; Topics section
[topic=test]
[topic=meta-test]
;; add your topicshere before use it
[topic=oct29]
Because use master/slave Pattern , Therefore, Hefei must be maintained at all times 192.168.52.23 And Guangzhou 192.168.70.157 Of server.ini Document keeping and Beijing 192.168.51.33 identical , Even if new topic, It is also necessary to manually server.ini Register in .
Modify the three places conf/async_slave.properties, Beijing's remains unchanged , Hefei is revised as
#slave Number , Greater than or equal to 0 To act as slave start-up , The same master Under the slave The number should be set to a different value .
slaveId=1
# As slave Start up to master Subscribe to the message group, If it is not configured, it defaults to meta-slave-group
# Different slaveId Please use different group
slaveGroup=meta-slave-group
#slave Maximum delay of data synchronization , Unit millisecond
slaveMaxDelayInMills=500
# Automatically from master Sync server.ini, 1.4.2 New options
# You still need to copy it yourself for the first time server.ini, You can set this option to true To automatically synchronize
autoSyncMasterConfig=true
Guangzhou conf/async_slave.properties It is amended as follows :
#slave Number , Greater than or equal to 0 To act as slave start-up , The same master Under the slave The number should be set to a different value .slaveId=2
# As slave Start up to master Subscribe to the message group, If it is not configured, it defaults to meta-slave-group# Different slaveId Please use different groupslaveGroup=meta-slave-group-gz
#slave Maximum delay of data synchronization , Unit millisecond slaveMaxDelayInMills=500# Automatically from master Sync server.ini, 1.4.2 New options # You still need to copy it yourself for the first time server.ini, You can set this option to true To automatically synchronize autoSyncMasterConfig=true5. start-up MetaQ colony
Start two first slave:
Hefei and Guangzhou will switch directories to /usr/lib/metaq/bin Next , Use slave mode MetaQ:
./metaServer.sh start slave &
Beijing launch master:
./metaServer.sh start &
3、 ... and . problem
1. Topic How much is the default partition ? namely server.ini in numPartitions Configuration of , At present for 16, When using 1024 Many times, the disk efficiency will be too low ,message The probability of sending failure increases .
2. Asynchronously replicated slave Will participate in consumer activities , Message consumers can choose from slave Get information from and consume , Consumers will randomly choose from master and slaves Choose one of them for consumption broker. How to specify consumer from slave Middle consumption message Instead of spending master What about ?
3. You can add one topic It doesn't restart MetaQ Do you ?
Four . Reference resources
MetaQ HA: https://github.com/killme2008/Metamorphosis/wiki/HA
MetaQ Source code analysis :https://github.com/killme2008/Metamorphosis/wiki/%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90
MetaQ Wiki:https://github.com/killme2008/Metamorphosis/wiki
MetaQ User guide :http://www.linuxidc.com/Linux/2013-11/92750.htm
Distributed Publish subscribe message system Kafka Architecture design http://www.linuxidc.com/Linux/2013-11/92751.htm
边栏推荐
- ARM9开发之学习过程总结[通俗易懂]
- Problems encountered in local deployment conflict: MySQL database code, isolation level and verification code are not displayed
- Five solutions that give consideration to enterprise anti epidemic and development, from IBM
- 提升可观测性 - 业务指标监控实践
- logback 日志输出格式
- [tcaplusdb knowledge base] view tcapdir directory server
- 基于DataWorks的时效仿真平台|得物技术
- 编写自己的 WordPress 模板
- 【TcaplusDB知识库】WebClient用户如何读取和修改数据
- 「杰伦熊」暴跌96.6% 明星带货NFT为何遇冷?
猜你喜欢

【TcaplusDB】祝大家端午安康!

This simple little function saves 213 hours for our production research team in half a year
![[tcapulusdb knowledge base] Introduction to tcapulusdb restrictions](/img/d3/27f09f7f5ab8e27d1ab87a35a9c0f3.png)
[tcapulusdb knowledge base] Introduction to tcapulusdb restrictions

Tianyi cloud web application firewall (edge cloud version) passed the first batch of trusted authentication

visio 使用

"Popular science leaders say" intelligent bionic robot fish

【TcaplusDB知识库】TcaplusDB技术支持介绍

AUTOSAR software development training

提升可观测性 - 业务指标监控实践

Cardinality sorting - common sorting method (2/8)
随机推荐
Please ask me, the queries written in my database account for 99%. Is it better to use pay as you go mode or reservation mode?
Flex layout
软件快速交付真的需要以安全为代价吗?
「杰伦熊」暴跌96.6% 明星带货NFT为何遇冷?
How to solve the problem of Caton screen when easycvr plays video?
Curve 替换 Ceph 在网易云音乐的实践
RHEL6.4中使用Cacti+Spine监控主机实现发送邮件报警
Js中的Bom
Subscription publishing mode bus in JS
Written interview algorithm classic - longest palindrome substring
【TcaplusDB知识库】TcaplusDB技术支持介绍
[tcapulusdb knowledge base] batch copy the game area
MATLB|电力系统优化运行与市场化
12 SQL optimization schemes summarized by old drivers (very practical)
IP problem occurs when a virtual system is cloned in VirtualBox
中金证券经理给的开户链接安全吗?找谁可以开户啊?
如何备份 WordPress 数据库
Lucky draw animation - Carp jumps over the dragon's gate
抓取手机端变体组合思路设想
The number of different integers in the character string of [3 questions (3) per day]