上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: 本文基于windows 7 64bit环境。一 下载如下工具1. python 2.6.6http://www.python.org/ftp/python/2.6.6/python-2.6.6.amd64.msi2.ez_setuphttp://peak.telecommunity.com/dist/ez_setup.py二 搭建环境1. 安装python2.6.6于D:\ProgramFiles\Python26\,并将D:\ProgramFiles\Python26\;D:\ProgramFiles\Python26\Scripts2. 安装ez_setup:ez_setup.py -U 阅读全文
posted @ 2013-11-18 23:20 blockcipher 阅读(247) 评论(0) 推荐(0) 编辑
摘要: http://www.zdnet.com.cn/wiki-GSLBGSLBGSLB 是英文Gobal Server Load Balance的缩写,意思是全局负载均衡。 作用:实现在广域网(包括互联网)上不同地域的服务器间的流量调配,保证使用最佳的服务器服务离自己最近的客户,从而确保访问质量。分类:基于DNS实现、基于重定向实现、基于路由协议实现。特点:能通过判断服务器的负载,包括CPU占用、带宽占用等数据,决定服务器的可用性,同时能判断用户(访问者)与服务器间的链路状况,选择链路状况最好的服务器。因此GSLB是对服务器和链路进行综合判断来决定由哪个地点的服务器来提供服务,实现异地服务器群服务 阅读全文
posted @ 2013-10-07 15:43 blockcipher 阅读(5020) 评论(0) 推荐(1) 编辑
摘要: 转载地址http://www.ctohome.com/FuWuQi/1b/688.htmlsysstat 是Linux 系统中的常用工具包。它的主要用途是观察服务负载,比如CPU和内存的占用率、网络的使用率以及磁盘写入和读取速度等。sysstat 工具包中包含两类工具:即时查看工具:iostat、mpstat、sar累计统计工具:sar也就是说,sar 具有这两种功能。因此,sar 是 sysstat 中的核心工具。为了实现 sar 的累计统计,系统必须周期地记录当时的信息,这是通过调用 /usr/lib/sa/ 中的三个工具实现的:sa1 :收集并存储每天系统动态信息到一个二进制的文件中,用 阅读全文
posted @ 2013-09-13 15:08 blockcipher 阅读(385) 评论(0) 推荐(0) 编辑
摘要: beanstalk中两种重要的数据结构就是集合和最小堆。 1. 集合 集合struct ms { size_t used, cap, last; void **items; ms_event_fn oninsert, onremove;};voidms_init(ms a, ms_event_fn oninsert, ms_event_fn onremove){ a->us... 阅读全文
posted @ 2013-08-24 15:55 blockcipher 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 1. tube定义 在beanstalk中,tube只是一个消息队列的名字,本身只是作为job的容器,因此不具有复杂的操作。 由于job具有优先级,这里采用最小堆保存job job具有ready和delay两种状态,因此每个tube采用两个最小堆对job进行管理。 tube结构struct tube { uint refs; char name[MAX_TUBE_NAME_LEN]; ... 阅读全文
posted @ 2013-08-24 15:49 blockcipher 阅读(1029) 评论(0) 推荐(0) 编辑
摘要: 在beanstalk中,网络处理模块没有使用第三方库,而是作者自己实现的一个模块,总计代码不到100行。是epoll的使用典范。1. epoll_eventstruct epoll_event结构如下:struct epoll_event { __uint32_t events; /* Epoll events */ epoll_data_t data; /* User data variable */};typedef union epoll_data { void ptr; int fd; __uint32_t u32; __uint64_t u64; }... 阅读全文
posted @ 2013-08-24 15:07 blockcipher 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 1. 文件结构组织beanstalk的源码文件物理组织如下:makefile文件:Makefile 数据结构定义: dat.h 主程序: main.c Server实例: serv.c 协议处理: prot.c 连接管理: conn.c tube管理: tube.c job管理: job.c 集合管理: ms.c daemon监听端口: net.c epoll抽象: linux.c 堆操作: heap.c daemon框架: sd-daemon.h sd-daemon.c binlog处理: file.c walg.c 系统时间: tim... 阅读全文
posted @ 2013-08-24 12:32 blockcipher 阅读(511) 评论(0) 推荐(0) 编辑
摘要: http://oldblog.antirez.com/post/autocomplete-with-redis.htmlHello! This isn't just a blog post, it is actually the Redis weekly update number eight, but we can't tell this to Google: naming posts likeRedis Weekly update #...will not play well with Google indexing, so I'm starting to use 阅读全文
posted @ 2013-08-18 20:41 blockcipher 阅读(341) 评论(0) 推荐(0) 编辑
摘要: http://highscalability.com/blog/2013/5/13/the-secret-to-10-million-concurrent-connections-the-kernel-i.htmlNow that we have theC10K concurrent connection problemlicked, how do we level up and support 10 million concurrent connections? Impossible you say. Nope, systems right now are delivering 10 mil 阅读全文
posted @ 2013-08-18 20:38 blockcipher 阅读(261) 评论(0) 推荐(0) 编辑
摘要: https://github.com/blog/542-introducing-resqueResqueis our Redis-backed library for creating background jobs, placing those jobs on multiple queues, and processing them later.Background jobs can be any Ruby class or module that responds toperform. Your existing classes can easily be converted to bac 阅读全文
posted @ 2013-08-18 20:36 blockcipher 阅读(206) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 10 下一页