12 2015 档案

摘要:一、 正常切换1)从服务器检查SHOW PROCESSLIST语句的输出,直到你看到Has read all relaylogwaiting for the slave I/O thread to update it2)确保从服务器已经处理了日志中的所有语句。 mysql> STOP SLAVE I... 阅读全文
posted @ 2015-12-23 10:17 wujf 阅读(281) 评论(0) 推荐(0) 编辑
摘要:1、主从配置#主从都要加入以下配置如下[mysqld]log-bin=mysql-bin#主从要不一样server-id=222 #在主上建立一个用户给从的用GRANT REPLICATION SLAVE,RELOAD,SUPER ON *.* TO backup@'%' IDENTIFIED BY... 阅读全文
posted @ 2015-12-23 10:16 wujf 阅读(191) 评论(0) 推荐(0) 编辑
摘要:worker_processes 1; #error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid /usr/local/nginx-0.8.32/n... 阅读全文
posted @ 2015-12-15 16:17 wujf 阅读(327) 评论(0) 推荐(0) 编辑
摘要:在github上下载了ServiceStack.Redis,做测试发现有限制,居然从v4开始就收费,无聊时,做了个源码分析废话不多,上测试代码 try { for (int i = 0; i ("w", "1"); ... 阅读全文
posted @ 2015-12-11 22:24 wujf 阅读(3130) 评论(0) 推荐(0) 编辑
摘要:具体的看注释,代码如下: 1 public static void TransTest() 2 { 3 RedisClient client1 = new RedisClient(host, port); 4 Redis... 阅读全文
posted @ 2015-12-11 17:20 wujf 阅读(340) 评论(0) 推荐(0) 编辑
摘要:redis的一此笔记1、redis-cli -p 63792、config get requirepass3、config set requirepass test1234、auth test123或者查看配置文件,可以看到requirepass,修改其值,重启Redismaster 有密码,sla... 阅读全文
posted @ 2015-12-10 09:47 wujf 阅读(199) 评论(0) 推荐(0) 编辑
摘要:现有020的系统架构走库存,取券通过Fetch前n条来实现买n张优惠券,但此做法在高并发时有严重的性能问题,性能问题主要体现在数据库。 为了优化此性能,系统改为redis,走队列模式,即生产者消费者。 以下是自己做性能测试一此小杂记。 1 public static void testEnqueue 阅读全文
posted @ 2015-12-08 10:39 wujf 阅读(1475) 评论(1) 推荐(4) 编辑
摘要:package com.wjf.helper;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;import java.lang.reflect.Field;import... 阅读全文
posted @ 2015-12-07 18:03 wujf 阅读(250) 评论(0) 推荐(0) 编辑
摘要:马上要用redis来改造现有的o2o项目了,在linux下部署了个redis,顺便研究了下代码操作,分享下代码using System;using System.Collections.Generic;using ServiceStack.Redis;namespace SysBuild{ c... 阅读全文
posted @ 2015-12-07 16:58 wujf 阅读(6110) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示