将EC2流量从1个实例转发到另一个实例?

时间:2013-11-04 08:36:49

标签: amazon-web-services amazon-ec2 portforwarding countly-analytics

我在免费的AWS EC2上设置了countly analytics,但是愚蠢地没有设置弹性IP。不,流量太大了,我甚至无法登录分析,因为CPU始终以100%的速度运行。

我正在发布应用更新以将分析地址更改为转发到EC2实例的专用域,因此我可以在以后更改转发。

与此同时,我是否可以设置第二个实例并将所有流量从当前流量转发到新流量?

我发现这个http://lastzactionhero.wordpress.com/2012/10/26/remote-port-forwarding-from-ec2/会从1个EC2实例到另一个吗?

由于

编辑--- 点数记录

  

/home/ubuntu/countlyinstall/countly/api/node_modules/mongoskin/node_modules/mongodb/lib/mongodb/connection/server.js:529           扔错了;                 ^ ReferenceError:未定义liveApi       at processUserSession(/home/ubuntu/countlyinstall/countly/api/parts/data/usage.js:203:17)       在/home/ubuntu/countlyinstall/countly/api/parts/data/usage.js:32:13       at /home/ubuntu/countlyinstall/countly/api/node_modules/mongoskin/node_modules/mongodb/lib/mongodb/collection.js:1010:5       在Cursor.nextObject(/home/ubuntu/countlyinstall/countly/api/node_modules/mongoskin/node_modules/mongodb/lib/mongodb/cursor.js:653:5)       at commandHandler(/home/ubuntu/countlyinstall/countly/api/node_modules/mongoskin/node_modules/mongodb/lib/mongodb/cursor.js:635:14)       在null。 (/home/ubuntu/countlyinstall/countly/api/node_modules/mongoskin/node_modules/mongodb/lib/mongodb/db.js:1709:18)       在g(events.js:175:14)       在EventEmitter.emit(events.js:106:17)       在Server.Base._callHandler(/home/ubuntu/countlyinstall/countly/api/node_modules/mongoskin/node_modules/mongodb/lib/mongodb/connection/base.js:130:25)       at /home/ubuntu/countlyinstall/countly/api/node_modules/mongoskin/node_modules/mongodb/lib/mongodb/connection/server.js:522:20

1 个答案:

答案 0 :(得分:1)

您可以按照博文中描述的步骤进行端口转发。请确保不要将其转发给localhost:)

也是大约100%的CPU,它可能是由MongoDB引起的。你有机会检查这个过程吗?如果是mongod,请发出mongotop命令以查看最耗时的集合访问。我们可以从那里出发。