Skip to content

Update README.md #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,33 @@ We call this limitation primitive "tickets". In this case, the resource access
is limited to 5 tickets (see Configuration). The timeout value specifies the
maximum amount of time to block if no ticket is available.

```mermaid

graph TD;
Start[Start]
CheckConnection{Request Connection to Resource}
AllocateTicket[Allocate Ticket if Available]
BlockTimeout[Block until Timeout or Ticket Available]
AccessResource[Access Resource]
ReleaseTicket[Release Ticket]
FailRequest[Fail Request]
OpenCircuit[Open Circuit Breaker]

Start --> CheckConnection
CheckConnection -->|Ticket Available| AllocateTicket
AllocateTicket --> AccessResource
AccessResource --> ReleaseTicket
ReleaseTicket --> CheckConnection

CheckConnection -->|No Ticket Available| BlockTimeout
BlockTimeout -->|Timeout| FailRequest
BlockTimeout -->|Ticket Available| AccessResource

FailRequest --> OpenCircuit
OpenCircuit --> CheckConnection

```

How do we limit the access to a resource for all workers on a server when the
workers do not directly share memory? This is implemented with [SysV
semaphores][sysv] to provide server-wide access control.
Expand Down