{"action":"created","issue":{"url":"https://api.github.com/repos/NetEase/pomelo/issues/784","repository_url":"https://api.github.com/repos/NetEase/pomelo","labels_url":"https://api.github.com/repos/NetEase/pomelo/issues/784/labels{/name}","comments_url":"https://api.github.com/repos/NetEase/pomelo/issues/784/comments","events_url":"https://api.github.com/repos/NetEase/pomelo/issues/784/events","html_url":"https://github.com/NetEase/pomelo/issues/784","id":124054497,"number":784,"title":"请教下关于pomelo前端服务器各种问题！","user":{"login":"jonathang4","id":11583266,"avatar_url":"https://avatars.githubusercontent.com/u/11583266?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathang4","html_url":"https://github.com/jonathang4","followers_url":"https://api.github.com/users/jonathang4/followers","following_url":"https://api.github.com/users/jonathang4/following{/other_user}","gists_url":"https://api.github.com/users/jonathang4/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathang4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathang4/subscriptions","organizations_url":"https://api.github.com/users/jonathang4/orgs","repos_url":"https://api.github.com/users/jonathang4/repos","events_url":"https://api.github.com/users/jonathang4/events{/privacy}","received_events_url":"https://api.github.com/users/jonathang4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-28T11:25:12Z","updated_at":"2016-02-15T01:55:25Z","closed_at":null,"body":"我们在写一个类似于lordofpomelo的多人在线游戏。消息广播频率是150毫秒一次，广播内容是坐标索引等等。但是现在遇到瓶颈有以下几点：\r\n1.一个前端上如果socket链接数(也就是被广播的人数)超过大概120个的时候，这个前端线程会挂掉。\r\n2.可能是项目经验有限，现在广播消息的数据量总是很大，但是却找不到减小广播的办法。protobuf也用上了，但是数据量还是很大。大到web端可以看出20K到30K每秒的流量消耗。\r\n3.我们在启动的时候app.js一直用的是:'production|development'。单独写production启动socket无法链接，不知道啥原因。另外想知道  production 和 development 的模式，有什么区别。\r\n简单总结下，其实主要问题就是：1项目流量很大。2 游戏线程总是会挂掉。\r\n还请假各位帮忙指点指点，我看文档，看源码看了好些日子了。实在是不知道怎么解决了，惭愧。"},"comment":{"url":"https://api.github.com/repos/NetEase/pomelo/issues/comments/184023921","html_url":"https://github.com/NetEase/pomelo/issues/784#issuecomment-184023921","issue_url":"https://api.github.com/repos/NetEase/pomelo/issues/784","id":184023921,"user":{"login":"pipi32167","id":1400806,"avatar_url":"https://avatars.githubusercontent.com/u/1400806?v=3","gravatar_id":"","url":"https://api.github.com/users/pipi32167","html_url":"https://github.com/pipi32167","followers_url":"https://api.github.com/users/pipi32167/followers","following_url":"https://api.github.com/users/pipi32167/following{/other_user}","gists_url":"https://api.github.com/users/pipi32167/gists{/gist_id}","starred_url":"https://api.github.com/users/pipi32167/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipi32167/subscriptions","organizations_url":"https://api.github.com/users/pipi32167/orgs","repos_url":"https://api.github.com/users/pipi32167/repos","events_url":"https://api.github.com/users/pipi32167/events{/privacy}","received_events_url":"https://api.github.com/users/pipi32167/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T01:55:25Z","updated_at":"2016-02-15T01:55:25Z","body":"环境变量用于切换环境，用法如下：\r\n\r\npomelo start -e production\r\npomelo start -e development"}}