摘要: cluster模块实现多进程 现在的cluster已经可以说完全做到的负载均衡,在做代理服务和http服务器的时候能够讲服务器性能发挥到最大。来看一下具体的实现吧 分开的写法 ,业务逻辑完全独立出来 加上console.log('Worker #' + cluster.worker.id + ' m 阅读全文
posted @ 2016-07-21 23:52 yuan.net 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 有的时候会遇到一种情况,在一台服务器,一个redis实例会出现不够用的情况 那么这时我们可以创建多个实例,以满足不同的业务需求和功能需求 1.首先创建一个运行redis的普通用户 useradd -s /sbin/nologin -g zxredis zxredis 2.然后给相应的目录授权 cho 阅读全文
posted @ 2016-07-08 19:40 yuan.net 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 使用 nohup 让nodejs进程在后台运行。 比如运行"nohup node yourjsfile.js > /dev/null &" 阅读全文
posted @ 2016-07-06 18:35 yuan.net 阅读(1003) 评论(0) 推荐(0) 编辑
摘要: 耗时统计 耗时统计 第一种是以毫秒为单位计算的。long startTime = System.currentTimeMillis(); //获取开始时间 //程序做一些功能性的操作doSomething(); long endTime = System.currentTimeMillis(); / 阅读全文
posted @ 2016-07-05 09:55 yuan.net 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 转自:http://blog.csdn.net/mickjoust/article/details/51646658 每日金句 你要搞清楚自己人生的剧本:不是你父母的续集,不是你子女的前传,更不是你朋友的外篇。对待生命你不妨大胆冒险一点,因为好歹你要失去它。——源自尼采 题记 上面的金句是被转载很多 阅读全文
posted @ 2016-07-03 13:27 yuan.net 阅读(1097) 评论(0) 推荐(0) 编辑
摘要: Redis: OOM command not allowed when used memory > ‘maxmemory’ 解决方式: $ vim /etc/redis/6903.conf maxmemory 3gb maxmemory-policy allkeys-lru maxmemory-sa 阅读全文
posted @ 2016-07-02 15:14 yuan.net 阅读(964) 评论(0) 推荐(0) 编辑
摘要: 安装postgresql: 安装pgbouncer 下载地址:http://pgfoundry.org/frs/download.php/2987/pgbouncer-1.4.1.tgz 安装 tar -zxvf pgbouncer-1.7.2.tgz cd pgbouncer-1.7.2 ./co 阅读全文
posted @ 2016-07-01 14:54 yuan.net 阅读(601) 评论(0) 推荐(0) 编辑
摘要: HikariCP 连接池配置: http://stackoverflow.com/questions/29650501/hikaricp-starts-when-mvn-spring-bootrun-but-not-with-a-deployable-war-file http://stackove 阅读全文
posted @ 2016-07-01 10:49 yuan.net 阅读(1848) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.alexecollins.com/spring-boot-performance/ 官方优化文档: https://spring.io/blog/2015/12/10/spring-boot-memory-performance SPRING BOOT PERFORMAN 阅读全文
posted @ 2016-06-30 22:14 yuan.net 阅读(502) 评论(0) 推荐(0) 编辑
摘要: 转自:https://dzone.com/articles/spring-boot-memory-performance It has sometimes been suggested that Spring and Spring Boot are “heavyweight”, perhaps ju 阅读全文
posted @ 2016-06-30 22:13 yuan.net 阅读(1907) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.cnblogs.com/airsong23/p/3893094.html 适应情况: 有时,我们的机器HOST-A只能通过代理服务器HOST-B才可以访问internet, 而与我们相连的机器HOST-C也需要访问internet, 但是HOST-C却不能直接访问HOST 阅读全文
posted @ 2016-06-29 17:53 yuan.net 阅读(676) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.cnblogs.com/sixiweb/archive/2012/11/20/2778732.html 搭建过程参考这篇文章 先说我搭建过程中出现的问题吧: 按照 教程搭建好之后出现了619错误,查看日志:/var/log/messages: Nov 20 09:46:2 阅读全文
posted @ 2016-06-29 17:49 yuan.net 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 官方英文原版说明:http://www.3proxy.ru/howtoe.asp 配置文件的简要说明:如果你的英文理解力好,可以试着研究一下他的手册。以实例说明吧nscache 65536域名解析结果的cache时间log c:\windows\3proxy.log D日志文件路径,D = Dail 阅读全文
posted @ 2016-06-29 16:51 yuan.net 阅读(1298) 评论(0) 推荐(0) 编辑
摘要: 二、实践 一些说明: 项目IDE采用Intellij(主要原因在于Intellij颜值完爆Eclipse,谁叫这是一个看脸的时代) 工程依赖管理采用个人比较熟悉的Maven(事实上SpringBoot与Groovy才是天生一对) 1.预览: (1)github地址 https://github.co 阅读全文
posted @ 2016-06-25 20:15 yuan.net 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.wolonge.com/post/detail/118249 阅读全文
posted @ 2016-06-23 14:44 yuan.net 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 先介绍下mongodb的基本操作及使用 第一部:开启安全性验证 如果需要给MongoDB数据库使用安全验证,则需要用--auth开启安全性检查,则只有数据库认证的用户才能执行读写操作,开户安全性检查,有两种方式: 第一种:重新创建window service服务器,在创建服务时打开安全性验证。 1. 阅读全文
posted @ 2016-06-22 16:47 yuan.net 阅读(14724) 评论(0) 推荐(0) 编辑
摘要: yii2框架官方说明文档 http://www.yiiframework.com/doc/guide/2.0/zh_cn/caching.page yii2创建您的第一个application应用 http://www.yiiframework.com/doc/guide/2.0/zh_cn/qui 阅读全文
posted @ 2016-06-12 17:34 yuan.net 阅读(472) 评论(0) 推荐(0) 编辑
摘要: 近期在云服务器上新部署了一个项目 硬件配置 CPU: 2核 内存: 4096 MB (I/O优化) 开始是调试测试在用 没发觉,今天我看了下监控 cpu使用率达到了60-70% 而且一直持续 我怀疑是java 环境没配置。 重新配置了一下。还是不行 最后把hibernate项目先停掉。留mybati 阅读全文
posted @ 2016-05-30 16:52 yuan.net 阅读(948) 评论(0) 推荐(0) 编辑
摘要: 1.WNMP: http://www.wnmp.com.cn/ En: https://www.getwnmp.org/ 2.xampp:https://www.apachefriends.org/download.html https://www.apachefriends.org/zh_cn/i 阅读全文
posted @ 2016-05-29 18:54 yuan.net 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.nginx.cn/1134.html nginx如何配置才能支持codeigniter ? 1. codeigniter的url美化去掉index.php 1 2 3 4 5 location / { root html/gxtp; index index.php; tr 阅读全文
posted @ 2016-05-29 18:47 yuan.net 阅读(578) 评论(0) 推荐(0) 编辑