惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
Google DeepMind News
Google DeepMind News
罗磊的独立博客
Martin Fowler
Martin Fowler
博客园_首页
Stack Overflow Blog
Stack Overflow Blog
Last Week in AI
Last Week in AI
The GitHub Blog
The GitHub Blog
B
Blog
C
Check Point Blog
WordPress大学
WordPress大学
G
Google Developers Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
量子位
月光博客
月光博客
U
Unit 42
Engineering at Meta
Engineering at Meta
有赞技术团队
有赞技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 【当耐特】
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Jina AI
Jina AI
S
Secure Thoughts
aimingoo的专栏
aimingoo的专栏
D
Darknet – Hacking Tools, Hacker News & Cyber Security
I
Intezer
Latest news
Latest news
V
Vulnerabilities – Threatpost
D
Docker
Attack and Defense Labs
Attack and Defense Labs
Help Net Security
Help Net Security
S
Security @ Cisco Blogs
Forbes - Security
Forbes - Security
MongoDB | Blog
MongoDB | Blog
云风的 BLOG
云风的 BLOG
L
LINUX DO - 热门话题
P
Palo Alto Networks Blog
Cloudbric
Cloudbric
Spread Privacy
Spread Privacy

博客园 - 李占卫

设计 mycat服务启动{管理模块启动过程} mycat初探 zookeeper总结 rocketmq总结 分布式事务 MySQL vs. MongoDB: Choosing a Data Management Solution 基于 Jenkins 快速搭建持续集成环境 持续集成及部署利器:Go IOC性能对比 云主机性能测试结论 SSD性能对比 各压缩算法对比 C# 获取进程或线程的相关信息 用eclipse建立servlet工程 消息推送技术 检查表及总结 - 《代码大全》 服务治理过程演进 三大WEB服务器对比分析(apache ,lighttpd,nginx)
使用tcpcopy拷贝线上流量压测测试环境
李占卫 · 2015-01-21 · via 博客园 - 李占卫

tcpcopy项目地址:https://github.com/session-replay-tools/tcpcopy

作者地址:http://blog.csdn.net/wangbin579

1:环境描述

架设三台服务器

10.53.132.52

10.53.132.55

10.53.132.101

101我们认为是线上服务器,52和55是测试环境。我们在101上运行tcpcopy把线上流量拷贝到55,在55上我们通过路由将应答转向52,在52上把应答丢弃。

分别在101和55上部署apache,端口是8090

2:步骤

101上部署tcpcopy

tcpcopy -x 8090-10.53.132.55:8090 -s 10.53.132.52 -c 192.168.100.x -n 5

将本机8090上的流量复制到55的8090端口。

-s指定intercept进程所在的服务器。(丢包服务器)

-c修改请求的host地址为192.168.100.x,以便在55上设置路由(设置路由是为了将应答转向52【丢包服务器】)

-n流量放大倍数

55上设置路由

route add -net 192.168.100.0 netmask 255.255.255.0 gw 10.53.132.52

52上运行intercept

intercept -i eth1 -F tcp and src port 8090 -d

参考地址

http://blog.csdn.net/wangbin579/article/details/8950282

http://blog.csdn.net/wangbin579/article/details/7476413