没有合适的资源?快使用搜索试试~ 我知道了~
首页couchbase的使用手册
couchbase的使用手册

主要讲解couchbase的安装和基本使用。按照教程的讲解,应该足够入门使用了。希望能帮助有需要的童鞋。 couchbase继承了memcache和nosql 同时如果有任何疑问,欢迎交流
资源详情
资源评论
资源推荐

Couchbase Server Manual 1.8

Couchbase Server Manual 1.8
Abstract
This manual documents the Couchbase Server 1.8 series, including installation, monitoring, and administration interface and associat-
ed tools.
Couchbase Server 1.8 is a re-branded release of Membase Server 1.7 with some additional fixes and changes.
Last document update: 21 May 2012 22:55; Document built: 21 May 2012 22:55.
Documentation Availability and Formats. This documentation is available online: HTML Online . For other documentation from
Couchbase, see Couchbase Documentation Library
Contact: editors@couchbase.com or couchbase.com
Copyright © 2010, 2011 Couchbase, Inc. Contact copyright@couchbase.com.
For documentation license information, see Section D.1, “Documentation License”. For all license information, see Appendix D, Licenses.

iii
Table of Contents
Preface .................................................................................................................................................... ix
1. Manual Conventions ....................................................................................................................... ix
1. Introduction to Couchbase Server .............................................................................................................. 1
1.1. Couchbase Server Basics ............................................................................................................... 1
1.2. Couchbase Server and NoSQL ........................................................................................................ 2
1.3. Architecture and Concepts ............................................................................................................. 2
1.3.1. Nodes and Clusters ............................................................................................................ 3
1.3.2. Cluster Manager ................................................................................................................ 3
1.3.3. Memory Quotas ................................................................................................................. 3
1.3.4. Buckets ............................................................................................................................ 4
1.3.5. vBuckets .......................................................................................................................... 6
1.3.6. Disk Storage ..................................................................................................................... 6
1.3.7. Failover ............................................................................................................................ 7
1.3.8. Client Interface .................................................................................................................. 7
1.3.9. Administration Tools .......................................................................................................... 8
1.3.10. Statistics and Monitoring ................................................................................................... 8
2. Getting Started ..................................................................................................................................... 10
2.1. Preparation ................................................................................................................................ 10
2.1.1. Supported Platforms ......................................................................................................... 10
2.1.2. Hardware Requirements .................................................................................................... 10
2.1.3. Storage Requirements ....................................................................................................... 11
2.1.4. Web Browser (for administration) ....................................................................................... 11
2.1.5. Network Ports ................................................................................................................. 11
2.2. Installing Couchbase Server .......................................................................................................... 12
2.2.1. Red Hat Linux Installation ................................................................................................. 12
2.2.2. Ubuntu Linux Installation .................................................................................................. 12
2.2.3. Microsoft Windows Installation .......................................................................................... 13
2.2.4. Mac OS X Installation ...................................................................................................... 18
2.3. Upgrading to Couchbase Server 1.8 ............................................................................................... 19
2.3.1. Online (rolling) Upgrade Process ........................................................................................ 20
2.3.2. Offline (in-place) Upgrade Process ...................................................................................... 23
2.3.3. Node Upgrade Process ...................................................................................................... 24
2.3.4. Manually Controlled Upgrade Options ................................................................................. 25
2.4. Setting up Couchbase Server ........................................................................................................ 27
2.5. Testing Couchbase Server ............................................................................................................ 35
2.6. Next Steps ................................................................................................................................. 36
3. Administration Basics ............................................................................................................................ 37
3.1. Working with Couchbase data files ................................................................................................ 37
3.2. Startup and Shutdown of Couchbase Server ..................................................................................... 38
3.2.1. Startup and Shutdown on Linux .......................................................................................... 38
3.2.2. Startup and Shutdown on Windows ..................................................................................... 38
3.2.3. Startup and Shutdown on Mac OS X ................................................................................... 39
4. Best Practices ....................................................................................................................................... 41
4.1. Cluster Design Considerations ...................................................................................................... 41
4.2. Sizing Guidelines ........................................................................................................................ 42
4.2.1. RAM Sizing .................................................................................................................... 43
4.2.2. Disk Throughput and Sizing ............................................................................................... 45
4.2.3. Network Bandwidth .......................................................................................................... 46
4.2.4. Data Safety ..................................................................................................................... 46
4.3. Deployment Considerations .......................................................................................................... 47
4.4. Ongoing Monitoring and Maintenance ............................................................................................ 48

Couchbase Server Manual 1.8
iv
4.4.1. Important UI Stats to Watch .............................................................................................. 49
4.4.2. Vacuuming ...................................................................................................................... 49
4.4.3. Post-rebalance .................................................................................................................. 49
4.5. Couchbase Behind a Secondary Firewall ......................................................................................... 50
4.6. Using Couchbase in the Cloud ...................................................................................................... 50
4.6.1. Local Storage .................................................................................................................. 51
4.6.2. IP addresses .................................................................................................................... 51
4.6.3. Security groups/firewall settings .......................................................................................... 53
4.6.4. Swap Space ..................................................................................................................... 53
4.7. Deployment Strategies ................................................................................................................. 53
4.7.1. Using a “smart” (vBucket aware) Client ............................................................................... 53
4.7.2. Client-Side (standalone) Proxy ............................................................................................ 54
4.7.3. Using Server-Side (Couchbase Embedded) Proxy ................................................................... 54
5. Administration Tasks ............................................................................................................................. 56
5.1. Failover with Couchbase .............................................................................................................. 56
5.1.1. Automatic Failover ........................................................................................................... 56
5.1.2. Automated failover considerations ....................................................................................... 57
5.1.3. Monitored failover ............................................................................................................ 57
5.2. Backup and Restore with Couchbase .............................................................................................. 58
5.2.1. Backing Up ..................................................................................................................... 58
5.2.2. Restore ........................................................................................................................... 59
5.3. Expanding and Shrinking your Cluster (Rebalancing) ........................................................................ 61
5.3.1. Growing your cluster ........................................................................................................ 62
5.3.2. Shrinking your cluster ....................................................................................................... 62
5.3.3. Rebalancing .................................................................................................................... 62
6. Administration Web Console ................................................................................................................... 64
6.1. Cluster Overview ........................................................................................................................ 64
6.1.1. Cluster ........................................................................................................................... 65
6.1.2. Buckets .......................................................................................................................... 66
6.1.3. Servers ........................................................................................................................... 66
6.2. Web Console Statistics ................................................................................................................ 67
6.3. Data Buckets ............................................................................................................................. 67
6.3.1. Creating and Editing Data Buckets ...................................................................................... 68
6.3.2. Bucket Information ........................................................................................................... 71
6.3.3. Individual Bucket Monitoring ............................................................................................. 71
6.4. Server Nodes ............................................................................................................................. 78
6.5. Couchbase Server States .............................................................................................................. 81
6.6. Settings ..................................................................................................................................... 82
6.6.1. Update Notification Settings ............................................................................................... 82
6.6.2. Auto-Failover Settings ...................................................................................................... 83
6.6.3. Alerts ............................................................................................................................. 83
6.7. Log .......................................................................................................................................... 85
6.7.1. Diagnostic Report ............................................................................................................. 86
6.8. Update Notifications .................................................................................................................... 87
6.8.1. Notifications .................................................................................................................... 87
6.8.2. Viewing Available Updates ................................................................................................ 87
6.9. Warnings and Alerts ................................................................................................................... 87
7. Couchbase Command-line Interface .......................................................................................................... 89
7.1. couchbase-cli Tool ..................................................................................................................... 89
7.2. cbstats Tool .............................................................................................................................. 92
7.3. cbflushctl Tool .......................................................................................................................... 92
7.4. tap.py Tool ............................................................................................................................... 93
7.5. cbvbucketctl Tool ...................................................................................................................... 93
7.6. cbvbuckettool Tool .................................................................................................................... 93

Couchbase Server Manual 1.8
v
7.7. cbdbmaint Tool ......................................................................................................................... 94
7.8. cbcollect_info Tool ..................................................................................................................... 94
8. Couchbase Management REST API ......................................................................................................... 95
8.1. Key Concepts ............................................................................................................................ 95
8.1.1. Resources ....................................................................................................................... 95
8.1.2. HTTP Request Headers ..................................................................................................... 96
8.1.3. HTTP Status Codes .......................................................................................................... 96
8.2. Operations ................................................................................................................................. 97
9. Developing with Couchbase .................................................................................................................. 116
9.1. Use Cases ................................................................................................................................ 116
9.1.1. Session store .................................................................................................................. 116
9.1.2. Social gaming ................................................................................................................ 116
9.1.3. Ad, offer and content targeting ......................................................................................... 116
9.1.4. Real-time logging and alerting .......................................................................................... 116
9.2. Best practices ........................................................................................................................... 117
9.2.1. What should I store in an object ........................................................................................ 117
9.2.2. How should I store an object? .......................................................................................... 117
9.2.3. Objects that refer to other objects ...................................................................................... 117
9.2.4. Nested Items .................................................................................................................. 117
9.2.5. Simple Lists .................................................................................................................. 118
9.2.6. Multi-GET .................................................................................................................... 119
9.2.7. Locking ........................................................................................................................ 119
9.2.8. Data partitioning with buckets .......................................................................................... 120
9.3. Couchbase for Memcached Users ................................................................................................ 120
10. Developing Couchbase Clients ............................................................................................................. 121
10.1. REST/JSON ........................................................................................................................... 121
10.1.1. Parsing the JSON .......................................................................................................... 122
10.1.2. Encoding the vBucketId into each request ......................................................................... 123
10.1.3. Client Libraries and Rebalancing ..................................................................................... 123
10.1.4. Fast Forward Map ......................................................................................................... 124
10.1.5. Redundancy & Availability ............................................................................................. 124
11. Couchbase Architecture ...................................................................................................................... 125
11.1. Cluster Design ........................................................................................................................ 125
11.2. Persistence Design ................................................................................................................... 125
11.3. Component Overview ............................................................................................................... 125
11.4. Disk Storage (Growing Data Sets Beyond Memory) ...................................................................... 126
11.4.1. Design ........................................................................................................................ 126
11.4.2. Consequences of Memory faster than Disk ........................................................................ 127
11.5. Couchbase APIs ...................................................................................................................... 130
11.5.1. memcached protocol ..................................................................................................... 130
11.5.2. Additional Protocol Operations ........................................................................................ 132
11.6. Buckets ................................................................................................................................. 134
11.7. vBuckets ................................................................................................................................ 136
11.7.1. Couchbase Document ID-vBucket-Server Mapping Illustrated ............................................... 136
11.7.2. vBuckets in a world of memcached clients ....................................................................... 137
12. Monitoring Couchbase ........................................................................................................................ 138
12.1. Port numbers and accessing different buckets ............................................................................... 138
12.2. Monitoring startup (warmup) ..................................................................................................... 138
12.3. Disk Write Queue ................................................................................................................... 139
12.3.1. Monitoring the Disk Write Queue .................................................................................... 139
12.4. Couchbase Server Statistics ....................................................................................................... 140
12.4.1. REST Interface Statistics ................................................................................................ 140
12.4.2. Couchbase Server Node Statistics .................................................................................... 140
12.5. Couchbase Server Moxi Statistics ............................................................................................... 141
剩余167页未读,继续阅读














沧偕chillax
- 粉丝: 1
- 资源: 1
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
安全验证
文档复制为VIP权益,开通VIP直接复制

评论10