찾다
데이터 베이스MySQL 튜토리얼 Twemproxy代理Key-Value数据库SSDB实现数据分布式存储

SSDB是一个高性能的支持丰富数据结构的NoSQL数据库,用于替代Redis或者与Redis配合存储十亿级别列表的数据,现在已被许多知名企业所应用。我们使用SSDB是想将现有

    SSDB是一个高性能的支持丰富数据结构的 NoSQL 数据库, 用于替代 Redis或者与 Redis 配合存储十亿级别列表的数据,现在已被许多知名企业所应用。我们使用SSDB是想将现有的redis中的key迁移到SSDB以破除现有的redis 120G存储极限(当然可以扩展,但是计算了下成本就打算放弃了)。

    Twemproxy是twtter开源的一个redis和memcache代理服务器,这里我们使用Twemproxy代理来代理SSDB集群来实现数据的分布式存储,即shared。

    

    1、节点规划:

        Twemproxy        192.168.0.100    

        ssdb1 master     192.168.0.101

        ssdb1 slave      192.168.0.102

        ssdb2 master     192.168.0.103

        ssdb2 slave      192.168.0.104

    2、安装SSDB

## 解压下载好的ssdb软件包 $ unzip  ssdb-master.zip ## 安装gcc、gcc-c++ 、make等工具 ##编译、安装ssdb,会安装在/usr/local/ssdb/下面 $ cd ssdb-master $ make &&make install ## 进入安装目录 $ cd/usr/local/ssdb/ ## 启动ssdb-server $ ./ssdb-server -dssdb.conf ssdb 1.8.2 Copyright (c)2012-2014 ssdb.io ## 验证是否启动成功,若8888端口被监听,则表示成功 $ netstat-alnut|grep 8888 tcp       0      0 127.0.0.1:8888              0.0.0.0:*                   LISTEN ## 客户端连接 $ ./ssdb-cli -p8888  ssdb (cli) - ssdb command line tool. Copyright (c)2012-2014 ssdb.io 'h' or 'help' forhelp, 'q' to quit. server version:1.8.2 ssdb 127.0.0.1:8888>

    3、主从配置,以ssdb1为例

## 修改ssdb1 master的配置文件,如下 # ssdb-server config # MUST indent by TAB!   # relative to path of this file, directorymust exists work_dir = ./var pidfile = ./var/ssdb.pid   server:        ip:192.168.0.101        port:8888        # bind to public ip        #ip: 0.0.0.0        # format: allow|deny: all|ip_prefix        # multiple allows or denys is supported        #deny: all        #allow: 127.0.0.1        #allow: 192.168        # auth password must be at least 32 characters        #auth: very-strong-password   replication:        binlog: yes        # Limit sync speed to *MB/s, -1: no limit        sync_speed: -1        slaveof:                 # to identify a master even ifit moved(ip, port changed)                 # if set to empty or notdefined, ip:port will be used.                 #id: svc_2                 # sync|mirror, default is sync                 #type: sync                 #ip: 127.0.0.1                 #port: 8889   logger:        level: debug        output: log.txt        rotate:                 size: 1000000000   leveldb:        # in MB        cache_size: 500        # in KB        block_size: 32        # in MB        write_buffer_size: 64        # in MB        compaction_speed: 1000        # yes|no        compression: yes ## 修改ssdb1 slave的配置文件,如下 # ssdb-server config # MUST indent by TAB!   # relative to path of this file, directorymust exists work_dir = ./var pidfile = ./var/ssdb.pid   server:         ip: 192.168.0.102         port: 8888        # bind to public ip        #ip: 0.0.0.0        # format: allow|deny: all|ip_prefix        # multiple allows or denys is supported        #deny: all        #allow: 127.0.0.1        #allow: 192.168        # auth password must be at least 32 characters        #auth: very-strong-password   replication:        binlog:yes        # Limit sync speed to *MB/s, -1: no limit        sync_speed: -1        slaveof:                 # to identify a master even if itmoved(ip, port changed)                 # if set to empty or notdefined, ip:port will be used.                 id: svc_1                 # sync|mirror, default is sync                 type:sync                 ip: 192.168.0.101                 port:8888   logger:        level: debug        output: log.txt        rotate:                 size: 1000000000   leveldb:        # in MB        cache_size: 500        # in KB        block_size: 32         # in MB        write_buffer_size: 64        # in MB        compaction_speed: 1000        # yes|no        compression: yes

   

성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
MySQL에서 기존보기를 삭제하거나 수정하려면 어떻게해야합니까?MySQL에서 기존보기를 삭제하거나 수정하려면 어떻게해야합니까?May 16, 2025 am 12:11 AM

todropaViewInmysql, "dropviewifexistsview_name;"및 TomodifyAview를 사용하고 "createOrreplaceViewView_NameAsselect ...". "

MySQL보기 : 어떤 디자인 패턴을 사용할 수 있습니까?MySQL보기 : 어떤 디자인 패턴을 사용할 수 있습니까?May 16, 2025 am 12:10 AM

mysqlViewScaneFeficTicallyINGILIDESIGNPATTORNSLIKEADAPTER, DECIARATOR, FACTORY 및 OBSERVER.1) AdapterPatternAdAptSDataFromDifferentTablesinToAunifiedView.2) Decor

MySQL에서 뷰를 사용하면 어떤 장점이 있습니까?MySQL에서 뷰를 사용하면 어떤 장점이 있습니까?May 16, 2025 am 12:09 AM

viewsinmysqlarebeneficialforsimplifyingcomplexqueries, envancingsecurity, dataconsistency, andoptimizing promperformance

MySQL에서 간단한보기를 어떻게 만들 수 있습니까?MySQL에서 간단한보기를 어떻게 만들 수 있습니까?May 16, 2025 am 12:08 AM

toeteimpleviewinmysql, usethecreateviewstatement.1) definetheviewwithReateViewview_nameas.2) specifyTesLectStatementToreTrievesiredData.3) usetheViewLikeAtableForqueries.ViewsSimplifyDataAccessAndenHances, ButconSiderFormance

MySQL 사용자 명령문 생성 : 예제 및 공통 오류MySQL 사용자 명령문 생성 : 예제 및 공통 오류May 16, 2025 am 12:04 AM

toCreateUserSinmysql, usethecreateuserstatement.1) foralocaluser : createUser'LocalUser '@'localHost'IndifiedBy'SecurePassword '; 2) foremoteUser : createUser'RemoteUser'@'%'reidentifiedBy'StrongPassword ';

MySQL에서 뷰를 사용하는 한계는 무엇입니까?MySQL에서 뷰를 사용하는 한계는 무엇입니까?May 14, 2025 am 12:10 AM

mysqlviewshavelimitations : 1) 그들은 upportallsqloperations, datamanipulation throughviewswithjoinsorbqueries를 제한하지 않습니다

MySQL 데이터베이스 확보 : 사용자 추가 및 권한 부여MySQL 데이터베이스 확보 : 사용자 추가 및 권한 부여May 14, 2025 am 12:09 AM

적절한 usermanagementInmysqliscrucialforenhancingsecurityandensuringfefficientDatabaseOperation.1) USECREATEUSERTOWDDUSERS,@'localHost'or@'%'.

MySQL에서 사용할 수있는 트리거 수에 영향을 미치는 요인은 무엇입니까?MySQL에서 사용할 수있는 트리거 수에 영향을 미치는 요인은 무엇입니까?May 14, 2025 am 12:08 AM

mysqldoes notimposeahardlimitontriggers, butpracticalfactorsdeteirefectiveuse : 1) ServerConfigurationimpactStriggerManagement; 2) 복잡한 트리거 스케일 스케일 사이드로드; 3) argertableSlowtriggerTriggerPerformance; 4) High ConconcercencyCancaUspriggerContention; 5) m

See all articles

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

뜨거운 도구

MinGW - Windows용 미니멀리스트 GNU

MinGW - Windows용 미니멀리스트 GNU

이 프로젝트는 osdn.net/projects/mingw로 마이그레이션되는 중입니다. 계속해서 그곳에서 우리를 팔로우할 수 있습니다. MinGW: GCC(GNU Compiler Collection)의 기본 Windows 포트로, 기본 Windows 애플리케이션을 구축하기 위한 무료 배포 가능 가져오기 라이브러리 및 헤더 파일로 C99 기능을 지원하는 MSVC 런타임에 대한 확장이 포함되어 있습니다. 모든 MinGW 소프트웨어는 64비트 Windows 플랫폼에서 실행될 수 있습니다.

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

SublimeText3 Linux 새 버전

SublimeText3 Linux 새 버전

SublimeText3 Linux 최신 버전

에디트플러스 중국어 크랙 버전

에디트플러스 중국어 크랙 버전

작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음

DVWA

DVWA

DVWA(Damn Vulnerable Web App)는 매우 취약한 PHP/MySQL 웹 애플리케이션입니다. 주요 목표는 보안 전문가가 법적 환경에서 자신의 기술과 도구를 테스트하고, 웹 개발자가 웹 응용 프로그램 보안 프로세스를 더 잘 이해할 수 있도록 돕고, 교사/학생이 교실 환경 웹 응용 프로그램에서 가르치고 배울 수 있도록 돕는 것입니다. 보안. DVWA의 목표는 다양한 난이도의 간단하고 간단한 인터페이스를 통해 가장 일반적인 웹 취약점 중 일부를 연습하는 것입니다. 이 소프트웨어는