部署时,考虑的三个点:
- 后勤方面:硬件,部署策略建议
- 更适合生产环境的配置更改
- 部署后的考虑:安全,最大限度的索引性能,备份
ES为重cpu、重io、重内存应用场景。性能更好的cpu能提升查询效率,更多的内存、更快的磁盘io对于写入能带来更好的提升。
package com.vip.saturn.job.console.config; | |
import org.springframework.boot.env.YamlPropertySourceLoader; | |
import org.springframework.core.env.PropertySource; | |
import org.springframework.core.io.support.EncodedResource; | |
import org.springframework.core.io.support.PropertySourceFactory; | |
import java.io.IOException; | |
import java.util.List; |
upstream itao_bds_core_11800 { | |
hash $request_uri; | |
# hash $remote_addr consistent; | |
server 10.203.24.7:11800; | |
server 10.203.24.9:11800; | |
server 10.203.24.12:11800; | |
server 10.203.24.60:11800; | |
} | |
server { |
<plugin> | |
<groupId>com.github.eirslett</groupId> | |
<artifactId>frontend-maven-plugin</artifactId> | |
<version>1.8.0</version> | |
<configuration> | |
<workingDirectory>${project.basedir}</workingDirectory> | |
<nodeVersion>v8.16.1</nodeVersion> | |
<downloadRoot>http://npm.taobao.org/mirrors/node/</downloadRoot> | |
</configuration> | |
<executions> |
// 设置DNS缓存时长: 秒
Security.setProperty("networkaddress.cache.ttl", "10");
Security.setProperty("networkaddress.cache.negative.ttl", "3");
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
message.max.bytes=10485760 (默认1M,注:单个topic级别配置为max.message.bytes,小心坑)
# replica.fetch.max.bytes=10485760 (默认1M)
def maybeWarnIfOversizedRecords(records: MemoryRecords, topicPartition: TopicPartition): Unit = {
// oversized messages don't cause replication to fail from fetch request version 3 (KIP-74)
[root@dexter-proxy bin]# crontab -l | |
*/1 * * * * sh /usr/bin/aliyun.sh | |
[root@dexter-proxy bin]# cat /usr/bin/aliyun.sh | |
#!/bin/bash | |
rm -rf /usr/local/aegis | |
for A in $(ps aux | grep -i aliyun | grep -v grep | awk '{print $2}') | |
do | |
kill -9 $A; | |
done |