Currently I am working on a distributed Weibo crawler. Weibo has strict restrictions on account and IP requests. I have seven or eight public IPs, but there are only four servers, so the other four IPs are wasted if not used. So I thought of using a virtual machine or docker to bind the public IP. Since the virtual machine was too bloated, and installing the virtual machine on centos7 was cumbersome, I decided to use docker, and then run my crawler program in docker. How can I make docker bind the static IP of the public network?
建议不用docker,配置管理较复杂,需要专业的网络知识,这里推荐另一个方案供参考,在一个网卡上配置多个IPv4地址,然后让每个进程绑定一个IP,这种方案要简单很多。如何配置多IP可以google/baidu一下,很多示例。
用nginx做代理