Merge pull request #1251 from little-cui/bug

Add Quota management README
diff --git a/docs/dev-guides.rst b/docs/dev-guides.rst
index 5fe364c..4479c03 100644
--- a/docs/dev-guides.rst
+++ b/docs/dev-guides.rst
@@ -7,6 +7,7 @@
 
    dev-guides/dev-guide.md
    dev-guides/extendmodule.md
+   dev-guides/quota.md
    dev-guides/multidcs.rst
    dev-guides/multidcs2.rst
    dev-guides/helm.md
diff --git a/docs/dev-guides/quota.md b/docs/dev-guides/quota.md
new file mode 100644
index 0000000..f9b18a9
--- /dev/null
+++ b/docs/dev-guides/quota.md
@@ -0,0 +1,29 @@
+# Quota plugins
+
+### Standard Plugins
+
+- buildin: standard quota management implement, read local quota configuration and limit the resource quotas.
+
+### How to extend
+
+1. Implement the interface `Manager` in server/plugin/quota/quota.go
+```go
+type Manager interface {
+	RemandQuotas(ctx context.Context, t ResourceType)
+	GetQuota(ctx context.Context, t ResourceType) int64
+	Usage(ctx context.Context, req *Request) (int64, error)
+}
+```
+
+2. Declare new instance func and register it to plugin manager
+```go
+import "github.com/apache/servicecomb-service-center/pkg/plugin"
+
+plugin.RegisterPlugin(plugin.Plugin{Kind: quota.QUOTA, Name: "your plugin name", New: NewPluginInstanceFunc})
+```
+
+3. edit conf/app.yaml
+```yaml
+quota:
+  kind: ${your plugin name}
+```
diff --git a/docs/index.rst b/docs/index.rst
index d7c7e76..4f6dbdb 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -14,7 +14,6 @@
    intro
    get-started
    user-guides
-   plugin-tracing-guides
 
 .. toctree::
    :maxdepth: 2
diff --git a/docs/plugin-tracing-guides.rst b/docs/plugin-tracing-guides.rst
index 81883c5..05b1519 100644
--- a/docs/plugin-tracing-guides.rst
+++ b/docs/plugin-tracing-guides.rst
@@ -1,4 +1,4 @@
-Tracing Plugins
+Tracing
 =========================
 
 .. toctree::
diff --git a/docs/user-guides.rst b/docs/user-guides.rst
index 7bba95d..1e06cfa 100644
--- a/docs/user-guides.rst
+++ b/docs/user-guides.rst
@@ -11,6 +11,9 @@
    user-guides/heartbeat.rst
    user-guides/sc-cluster.rst
    user-guides/integration-grafana.rst
+   user-guides/quota.md
+   plugin-tracing-guides
    user-guides/rbac.md
    user-guides/fast-registration.md
    user-guides/ux.md
+   user-guides/limits.md
diff --git a/docs/user-guides/limits.md b/docs/user-guides/limits.md
new file mode 100644
index 0000000..34279ed
--- /dev/null
+++ b/docs/user-guides/limits.md
@@ -0,0 +1,20 @@
+# Limits
+
+Exceed the limits may cause internal errors or performance degradation.
+
+### Http Server
+
+- Request head size: 3KB
+- Request body size: 2048KB
+
+### Microservice
+
+- Metadata size: 5KB
+- Schema content size: 2048KB
+- Properties size: 3KB
+
+### Instance
+
+- Metadata size: 5KB
+- Properties size: 3KB
+
diff --git a/docs/user-guides/quota.md b/docs/user-guides/quota.md
new file mode 100644
index 0000000..e245088
--- /dev/null
+++ b/docs/user-guides/quota.md
@@ -0,0 +1,42 @@
+# Quota management
+
+### Resources
+
+- service: microservice version quotas.
+- instance: instance quotas.
+- schema: schema quotas for each microservice.
+- tag: tag quotas for each microservice.
+- account: account quotas.
+- role: role quotas.
+
+### How to configure
+
+#### 1. Use configuration file
+
+edit conf/app.yaml
+```yaml
+quota:
+  kind: buildin
+  cap:
+    service:
+      limit: 50000
+    instance:
+      limit: 150000
+    schema:
+      limit: 100
+    tag:
+      limit: 100
+    account:
+      limit: 1000
+    role:
+      limit: 100
+```
+
+#### 2. Use environment variable
+
+- QUOTA_SERVICE: the same as the config key `quota.cap.service.limit`
+- QUOTA_INSTANCE: the same as the config key `quota.cap.instance.limit`
+- QUOTA_SCHEMA: the same as the config key `quota.cap.schema.limit`
+- QUOTA_TAG: the same as the config key `quota.cap.tag.limit`
+- QUOTA_ACCOUNT: the same as the config key `quota.cap.account.limit`
+- QUOTA_ROLE: the same as the config key `quota.cap.role.limit`