Commit 57d39ae1 authored by vicotor's avatar vicotor

Merge branch 'peer' into 'master'

Merge latest content to master.

See merge request !1
parents b0b1cf13 89884e62
...@@ -13,22 +13,14 @@ services: ...@@ -13,22 +13,14 @@ services:
volumes: volumes:
- ./cryptor/config.toml:/root/config.toml - ./cryptor/config.toml:/root/config.toml
sender: sender:
image: caduceus/cmp2-test-net-tester:v0.0.12-7 image: caduceus/cmp2-test-net-tester:v0.0.12-16
container_name: sender container_name: sender
entrypoint: sh -c 'echo +sender+ && sender -test.run TestManyToMany /privatefromto-100_000.tmp 192.168.1.220 cryptor-sender 1000 0 5000 >> /sender/sender.log 2>&1 ' entrypoint: sh -c 'echo +sender+ && sender -test.run TestManyToMany /privatefromto-100_000.tmp 192.168.1.220 cryptor-sender 10000 0 50000 >> /sender/sender.log 2>&1 '
#entrypoint: sh -c 'sender -test.run TestManyToMany -test.timeout 0 /privatefromto-10_000.tmp 192.168.1.220 cryptor-sender 30000' #entrypoint: sh -c 'sender -test.run TestManyToMany -test.timeout 0 /privatefromto-10_000.tmp 192.168.1.220 cryptor-sender 30000'
#echo " entrypoint: sh -c 'echo "+"ring"+" && sleep 10 && sender -test.run TestManyToMany -test.timeout 0 " #echo " entrypoint: sh -c 'echo "+"ring"+" && sleep 10 && sender -test.run TestManyToMany -test.timeout 0 "
#entrypoint: sh -c 'echo "sender" && sleep 40 && go test -v -run TestSendSignatureTxsStream ./rpc/grpc/ --timeout 0 -args ring 192.168.1.242 100000' #entrypoint: sh -c 'echo "sender" && sleep 40 && go test -v -run TestSendSignatureTxsStream ./rpc/grpc/ --timeout 0 -args ring 192.168.1.242 100000'
ports: ports:
- "2115:2115" - "2115:2115"
deploy:
resources:
limits:
cpus: "36.00"
memory: 32G
reservations:
cpus: "30.00"
memory: 32G
volumes: volumes:
- ./sender/sender:/sender/ - ./sender/sender:/sender/
depends_on: depends_on:
...@@ -37,7 +29,7 @@ services: ...@@ -37,7 +29,7 @@ services:
image: google/cadvisor:latest image: google/cadvisor:latest
container_name: cadvisor-sender container_name: cadvisor-sender
ports: ports:
- "8080:8080" - "8081:8080"
volumes: volumes:
- /:/rootfs:ro - /:/rootfs:ro
- /var/run:/var/run:rw - /var/run:/var/run:rw
......
{
"rpcURL": "http://192.168.1.220:18545"
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
server {
listen 18545;
server_name 13.213.12.100 ;
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Max-Age' 1728000;
return 204;
}
if ($request_method = 'POST') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
}
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
}
proxy_set_header Host $host:$server_port;
proxy_pass http://172.31.42.138:28545;
}
}
server {
listen 80;
server_name REMOTE_IP;
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Max-Age' 1728000;
return 204;
}
if ($request_method = 'POST') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
}
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
}
proxy_set_header Host $host:$server_port;
proxy_pass http://172.31.42.138:10080;
}
}
server {
listen 18545;
server_name EXPORT_IP ;
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Max-Age' 1728000;
return 204;
}
if ($request_method = 'POST') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
}
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
}
proxy_set_header Host $host:$server_port;
proxy_pass http://LOCAL_IP:28545;
}
}
server {
listen 80;
server_name REMOTE_IP;
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Max-Age' 1728000;
return 204;
}
if ($request_method = 'POST') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
}
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' '*';
}
proxy_set_header Host $host:$server_port;
proxy_pass http://LOCAL_IP:10080;
}
}
# cat nginx.conf
# nginx.conf -- docker-openresty
#
# This file is installed to:
# `/usr/local/openresty/nginx/conf/nginx.conf`
# and is the file loaded by nginx at startup,
# unless the user specifies otherwise.
#
# It tracks the upstream OpenResty's `nginx.conf`, but removes the `server`
# section and adds this directive:
# `include /etc/nginx/conf.d/*.conf;`
#
# The `docker-openresty` file `nginx.vh.default.conf` is copied to
# `/etc/nginx/conf.d/default.conf`. It contains the `server section
# of the upstream `nginx.conf`.
#
# See https://github.com/openresty/docker-openresty/blob/master/README.md#nginx-config-files
#
#user nobody;
worker_processes 4;
worker_rlimit_nofile 65535;
#error_log /var/log/nginx/error.log warn;
#pid /var/run/nginx.pid;
events {
#设置网路连接序列化,防止惊群现象发生,默认为on
accept_mutex on;
#设置一个进程是否同时接受多个网络连接,默认为off
multi_accept on;
#事件驱动模型,select|poll|kqueue|epoll|resig|/dev/poll|eventport
use epoll;
worker_connections 65535;
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
#限制请求
limit_req_zone $binary_remote_addr zone=api_read:20m rate=10r/s;
#limit_req_zone $uri zone=api_read:20m rate=100r/s;
#按ip配置一个连接 zone
limit_conn_zone $binary_remote_addr zone=perip_conn:10m;
#按server配置一个连接 zone
limit_conn_zone $server_name zone=perserver_conn:100m;
#指定在当前文件中包含另一个文件的指令
include mime.types;
#指定默认处理的文件类型可以是二进制
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
#混淆数据,影响三列冲突率,值越大消耗内存越多,散列key冲突率会降低,检索速度更快;值越小key,占用内存较少,冲突率越高,检索速度变慢
types_hash_max_size 2048;
charset utf-8;
#取消服务日志
#access_log off;
#access_log /var/log/nginx/access.log main;
#每个进程每次调用传输数量不能大于设定的值,默认为0,即不设上限。
sendfile_max_chunk 51200m;
sendfile on;
#单连接请求上限次数。
keepalive_requests 1200;
#让nginx在一个数据包中发送所有的头文件,而不是一个一个单独发
tcp_nopush on;
#nginx不要缓存数据,而是一段一段发送,如果数据的传输有实时性的要求的话可以配置它,发送完一小段数据就立刻能得到返回值,但是不要滥用
#tcp_nodelay on;
#设置请求头的超时时间
#client_header_timeout 10;
#设置请求体的超时时间
#client_body_timeout 10;
#指定客户端响应超时时间,如果客户端两次操作间隔超过这个时间,服务器就会关闭这个链接
#send_timeout 10;
#设置用于保存各种key的共享内存的参数
#limit_conn_zone $binary_remote_addr zone=addr:5m;
#给定的key设置最大连接数
#limit_conn addr 100
#虽然不会让nginx执行速度更快,但是可以在错误页面关闭nginx版本提示,对于网站安全性的提升有好处
#server_tokens
# SSL证书配置
#指令用于启动特定的加密协议,nginx在1.1.13和1.0.12版本后默认是ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2,TLSv1.1与TLSv1.2要确保OpenSSL >= 1.0.1
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
#设置协商加密算法时,优先使用我们服务端的加密套件,而不是客户端浏览器的加密套件
#ssl_prefer_server_ciphers on;
#给客户端分配连接超时时间,服务器会在这个时间过后关闭连接。一般设置时间较短,可以让nginx工作持续性更好
keepalive_timeout 65;
# Gzip 压缩配置
gzip on;
#gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
client_body_temp_path /var/run/openresty/nginx-client-body;
proxy_temp_path /var/run/openresty/nginx-proxy;
fastcgi_temp_path /var/run/openresty/nginx-fastcgi;
uwsgi_temp_path /var/run/openresty/nginx-uwsgi;
scgi_temp_path /var/run/openresty/nginx-scgi;
include /etc/nginx/conf.d/*.conf;
}
scrape_configs: scrape_configs:
- job_name: cadvisor-sender
scrape_interval: 5s
static_configs:
- targets:
- cadvisor-sender:8080
- job_name: cadvisor - job_name: cadvisor
scrape_interval: 5s scrape_interval: 5s
static_configs: static_configs:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment