Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ashishps1/awesome-system-design-resources
/ functions
Functions
65 in github.com/ashishps1/awesome-system-design-resources
⨍
Functions
65
◇
Types & classes
22
↓ 4 callers
Method
getServer
(String key)
implementations/java/consistent_hashing/ConsistentHashing.java:54
↓ 4 callers
Method
get_server
Finds the closest server for a given key. - Hash the key to get its position on the ring. - Move clockwise to find the neare
implementations/python/consistent_hashing/consistent-hashing.py:49
↓ 3 callers
Method
_hash
Computes a hash value for a given key using MD5.
implementations/python/consistent_hashing/consistent-hashing.py:21
↓ 3 callers
Method
hash
(String key)
implementations/java/consistent_hashing/ConsistentHashing.java:23
↓ 2 callers
Method
addServer
(String server)
implementations/java/consistent_hashing/ConsistentHashing.java:37
↓ 2 callers
Method
add_server
Adds a server to the hash ring along with its virtual nodes. - Each virtual node is a different hash of the server ID to distribute
implementations/python/consistent_hashing/consistent-hashing.py:25
↓ 2 callers
Method
allow_request
(self)
implementations/python/rate_limiting/sliding_window_counter.py:11
↓ 2 callers
Method
allow_request
(self)
implementations/python/rate_limiting/fixed_window_counter.py:10
↓ 2 callers
Method
allow_request
(self, tokens=1)
implementations/python/rate_limiting/token_bucket.py:10
↓ 2 callers
Method
allow_request
(self)
implementations/python/rate_limiting/leaky_bucket.py:11
↓ 2 callers
Method
allow_request
(self)
implementations/python/rate_limiting/sliding_window_log.py:10
↓ 1 callers
Method
getMaxWeight
()
implementations/java/load_balancing_algorithms/WeightedRoundRobin.java:31
↓ 1 callers
Method
getNextServer
()
implementations/java/load_balancing_algorithms/LeastResponseTime.java:16
↓ 1 callers
Method
getNextServer
()
implementations/java/load_balancing_algorithms/WeightedRoundRobin.java:16
↓ 1 callers
Method
getNextServer
(String clientIp)
implementations/java/load_balancing_algorithms/IPHash.java:10
↓ 1 callers
Method
getNextServer
()
implementations/java/load_balancing_algorithms/RoundRobin.java:13
↓ 1 callers
Method
getNextServer
()
implementations/java/load_balancing_algorithms/LeastConnections.java:15
↓ 1 callers
Method
get_next_server
(self)
implementations/python/load_balancing_algorithms/round_robin.py.py:6
↓ 1 callers
Method
get_next_server
(self, client_ip)
implementations/python/load_balancing_algorithms/ip_hash.py:7
↓ 1 callers
Method
get_next_server
(self)
implementations/python/load_balancing_algorithms/weighted_round_robin.py:8
↓ 1 callers
Method
get_next_server
(self)
implementations/python/load_balancing_algorithms/least_connections.py:7
↓ 1 callers
Method
get_next_server
(self)
implementations/python/load_balancing_algorithms/least_response_time.py:9
↓ 1 callers
Method
leak
()
implementations/java/rate_limiting/LeakyBucket.java:30
↓ 1 callers
Method
refill
()
implementations/java/rate_limiting/TokenBucket.java:29
↓ 1 callers
Method
releaseConnection
(String server)
implementations/java/load_balancing_algorithms/LeastConnections.java:22
↓ 1 callers
Method
release_connection
(self, server)
implementations/python/load_balancing_algorithms/least_connections.py:17
↓ 1 callers
Method
removeServer
(String server)
implementations/java/consistent_hashing/ConsistentHashing.java:45
↓ 1 callers
Method
remove_server
Removes a server and all its virtual nodes from the hash ring.
implementations/python/consistent_hashing/consistent-hashing.py:38
↓ 1 callers
Method
simulateResponseTime
(String server)
implementations/java/load_balancing_algorithms/LeastResponseTime.java:33
↓ 1 callers
Function
simulate_response_time
()
implementations/python/load_balancing_algorithms/least_response_time.py:19
↓ 1 callers
Method
updateResponseTime
(String server, double responseTime)
implementations/java/load_balancing_algorithms/LeastResponseTime.java:28
↓ 1 callers
Method
update_response_time
(self, server, response_time)
implementations/python/load_balancing_algorithms/least_response_time.py:14
Method
ConsistentHashing
(List<String> servers, int numReplicas)
implementations/java/consistent_hashing/ConsistentHashing.java:12
Method
FixedWindowCounter
(long windowSizeInSeconds, long maxRequestsPerWindow)
implementations/java/rate_limiting/FixedWindowCounter.java:11
Method
IPHash
(List<String> servers)
implementations/java/load_balancing_algorithms/IPHash.java:6
Method
LeakyBucket
(long capacity, double leakRate)
implementations/java/rate_limiting/LeakyBucket.java:13
Method
LeastConnections
(List<String> servers)
implementations/java/load_balancing_algorithms/LeastConnections.java:8
Method
LeastResponseTime
(List<String> servers)
implementations/java/load_balancing_algorithms/LeastResponseTime.java:9
Method
RoundRobin
(List<String> servers)
implementations/java/load_balancing_algorithms/RoundRobin.java:8
Method
SlidingWindowCounter
(long windowSizeInSeconds, long maxRequestsPerWindow)
implementations/java/rate_limiting/SlidingWindowCounter.java:12
Method
SlidingWindowLog
(long windowSizeInSeconds, long maxRequestsPerWindow)
implementations/java/rate_limiting/SlidingWindowLog.java:12
Method
TokenBucket
(long capacity, double fillRate)
implementations/java/rate_limiting/TokenBucket.java:11
Method
WeightedRoundRobin
(List<String> servers, List<Integer> weights)
implementations/java/load_balancing_algorithms/WeightedRoundRobin.java:9
Method
__init__
Initializes the consistent hashing ring. - servers: List of initial server names (e.g., ["S0", "S1", "S2"]) - num_replicas:
implementations/python/consistent_hashing/consistent-hashing.py:5
Method
__init__
(self, servers)
implementations/python/load_balancing_algorithms/round_robin.py.py:2
Method
__init__
(self, servers)
implementations/python/load_balancing_algorithms/ip_hash.py:4
Method
__init__
(self, servers, weights)
implementations/python/load_balancing_algorithms/weighted_round_robin.py:2
Method
__init__
(self, servers)
implementations/python/load_balancing_algorithms/least_connections.py:4
Method
__init__
(self, servers)
implementations/python/load_balancing_algorithms/least_response_time.py:5
Method
__init__
(self, window_size, max_requests)
implementations/python/rate_limiting/sliding_window_counter.py:4
Method
__init__
(self, window_size, max_requests)
implementations/python/rate_limiting/fixed_window_counter.py:4
Method
__init__
(self, capacity, fill_rate)
implementations/python/rate_limiting/token_bucket.py:4
Method
__init__
(self, capacity, leak_rate)
implementations/python/rate_limiting/leaky_bucket.py:5
Method
__init__
(self, window_size, max_requests)
implementations/python/rate_limiting/sliding_window_log.py:5
Method
allowRequest
()
implementations/java/rate_limiting/SlidingWindowLog.java:18
Method
allowRequest
()
implementations/java/rate_limiting/FixedWindowCounter.java:18
Method
allowRequest
()
implementations/java/rate_limiting/SlidingWindowCounter.java:20
Method
allowRequest
(int tokens)
implementations/java/rate_limiting/TokenBucket.java:18
Method
allowRequest
()
implementations/java/rate_limiting/LeakyBucket.java:20
Method
main
(String[] args)
implementations/java/consistent_hashing/ConsistentHashing.java:69
Method
main
(String[] args)
implementations/java/load_balancing_algorithms/LeastResponseTime.java:45
Method
main
(String[] args)
implementations/java/load_balancing_algorithms/WeightedRoundRobin.java:35
Method
main
(String[] args)
implementations/java/load_balancing_algorithms/IPHash.java:16
Method
main
(String[] args)
implementations/java/load_balancing_algorithms/RoundRobin.java:18
Method
main
(String[] args)
implementations/java/load_balancing_algorithms/LeastConnections.java:26