open-consul/docs
John Murret 700c693b33
adding config for request_limits (#15531)
* server: add placeholder glue for rate limit handler

This commit adds a no-op implementation of the rate-limit handler and
adds it to the `consul.Server` struct and setup code.

This allows us to start working on the net/rpc and gRPC interceptors and
config logic.

* Add handler errors

* Set the global read and write limits

* fixing multilimiter moving packages

* Fix typo

* Simplify globalLimit usage

* add multilimiter and tests

* exporting LimitedEntity

* Apply suggestions from code review

Co-authored-by: John Murret <john.murret@hashicorp.com>

* add config update and rename config params

* add doc string and split config

* Apply suggestions from code review

Co-authored-by: Dan Upton <daniel@floppy.co>

* use timer to avoid go routine leak and change the interface

* add comments to tests

* fix failing test

* add prefix with config edge, refactor tests

* Apply suggestions from code review

Co-authored-by: Dan Upton <daniel@floppy.co>

* refactor to apply configs for limiters under a prefix

* add fuzz tests and fix bugs found. Refactor reconcile loop to have a simpler logic

* make KeyType an exported type

* split the config and limiter trees to fix race conditions in config update

* rename variables

* fix race in test and remove dead code

* fix reconcile loop to not create a timer on each loop

* add extra benchmark tests and fix tests

* fix benchmark test to pass value to func

* server: add placeholder glue for rate limit handler

This commit adds a no-op implementation of the rate-limit handler and
adds it to the `consul.Server` struct and setup code.

This allows us to start working on the net/rpc and gRPC interceptors and
config logic.

* Set the global read and write limits

* fixing multilimiter moving packages

* add server configuration for global rate limiting.

* remove agent test

* remove added stuff from handler

* remove added stuff from multilimiter

* removing unnecessary TODOs

* Removing TODO comment from handler

* adding in defaulting to infinite

* add disabled status in there

* adding in documentation for disabled mode.

* make disabled the default.

* Add mock and agent test

* addig documentation and missing mock file.

* Fixing test TestLoad_IntegrationWithFlags

* updating docs based on PR feedback.

* Updating Request Limits mode to use int based on PR feedback.

* Adding RequestLimits struct so we have a nested struct in ReloadableConfig.

* fixing linting references

* Update agent/consul/rate/handler.go

Co-authored-by: Dan Upton <daniel@floppy.co>

* Update agent/consul/config.go

Co-authored-by: Dan Upton <daniel@floppy.co>

* removing the ignore of the request limits in JSON.  addingbuilder logic to convert any read rate or write rate less than 0 to rate.Inf

* added conversion function to convert request limits object to handler config.

* Updating docs to reflect gRPC and RPC are rate limit and as a result, HTTP requests are as well.

* Updating values for TestLoad_FullConfig() so that they were different and discernable.

* Updating TestRuntimeConfig_Sanitize

* Fixing TestLoad_IntegrationWithFlags test

* putting nil check in place

* fixing rebase

* removing change for missing error checks.  will put in another PR

* Rebasing after default multilimiter config change

* resolving rebase issues

* updating reference for incomingRPCLimiter to use interface

* updating interface

* Updating interfaces

* Fixing mock reference

Co-authored-by: Daniel Upton <daniel@floppy.co>
Co-authored-by: Dhia Ayachi <dhia@hashicorp.com>
2022-12-13 13:09:55 -07:00
..
acl Move contributing to docs 2021-08-30 16:17:09 -04:00
cli Move contributing to docs 2021-08-30 16:17:09 -04:00
client-agent Move contributing to docs 2021-08-30 16:17:09 -04:00
cluster-federation docs: simplify agent docs slugs 2022-04-11 17:38:47 -07:00
cluster-membership Move contributing to docs 2021-08-30 16:17:09 -04:00
config adding config for request_limits (#15531) 2022-12-13 13:09:55 -07:00
contributing Add changelog creation to contributor docs 2022-02-02 10:58:27 -08:00
debug Add some docs on pprof usage (#12551) 2022-05-09 14:15:21 -06:00
http-api Move contributing to docs 2021-08-30 16:17:09 -04:00
persistence Move contributing to docs 2021-08-30 16:17:09 -04:00
rpc grpc: rename public/private directories to external/internal (#13721) 2022-07-13 16:33:48 +01:00
service-discovery fix: missing UDP field in checkType (#14885) 2022-10-05 15:57:21 -04:00
service-mesh Add initial dev docs on config entries (#15717) 2022-12-12 12:02:18 -07:00
consul-mermaid-theme.json Move contributing to docs 2021-08-30 16:17:09 -04:00
faq.md Move contributing to docs 2021-08-30 16:17:09 -04:00
overview.mmd Move contributing to docs 2021-08-30 16:17:09 -04:00
overview.svg Move contributing to docs 2021-08-30 16:17:09 -04:00
README.md Document integration tests (#14391) 2022-09-13 10:00:02 -07:00

Consul Developer Documentation

See our contributing guide to get started.

This directory contains documentation intended for anyone interested in understanding, and contributing changes to, the Consul codebase.

Overview

This documentation is organized into the following categories. Each category is either a significant architectural layer, or major functional area of Consul. These documents assume a basic understanding of Consul's feature set, which can be found in the public user documentation.

Overview

source

Contents

  1. Command-Line Interface (CLI)
  2. HTTP API
  3. Agent Configuration
  4. RPC
  5. Cluster Persistence
  6. Client Agent
  7. Service Discovery
  8. Service Mesh (Connect)
  9. Cluster Membership
  10. Key/Value Store
  11. ACL
  12. Multi-Cluster Federation

Also see the FAQ.

Other Docs

  1. Integration Tests

Important Directories

Most top level directories contain Go source code. The directories listed below contain other important source related to Consul.

Contributing to these docs

This section is meta documentation about contributing to these docs.

Diagrams

The diagrams in these documents are created using the mermaid-js live editor. The mermaid-js docs provide a complete reference for how to create and edit the diagrams. Use the consul-mermaid-theme.json (paste it into the Config tab in the editor) to maintain a consistent Consul style for the diagrams.