{"id":21591039,"url":"https://github.com/tuananh/kubernetes-twemproxy","last_synced_at":"2025-09-19T17:23:46.846Z","repository":{"id":142279338,"uuid":"87919770","full_name":"tuananh/kubernetes-twemproxy","owner":"tuananh","description":"🚀 Running twemproxy on Kubernetes","archived":false,"fork":false,"pushed_at":"2022-11-28T13:04:30.000Z","size":6,"stargazers_count":19,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T19:22:11.540Z","etag":null,"topics":["kubernetes","memcached","redis","twemproxy"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tuananh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-11T10:12:08.000Z","updated_at":"2022-09-18T16:05:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"9fbe4317-49f3-47bd-ba72-3697649b3ba9","html_url":"https://github.com/tuananh/kubernetes-twemproxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuananh%2Fkubernetes-twemproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuananh%2Fkubernetes-twemproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuananh%2Fkubernetes-twemproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuananh%2Fkubernetes-twemproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuananh","download_url":"https://codeload.github.com/tuananh/kubernetes-twemproxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248307461,"owners_count":21081847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kubernetes","memcached","redis","twemproxy"],"created_at":"2024-11-24T16:22:15.887Z","updated_at":"2025-09-19T17:23:41.817Z","avatar_url":"https://github.com/tuananh.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# kubernetes-twemproxy\n\nRunning twemproxy on Kubernetes\n\n## Install redis\n\nSetup 2 instances of redis: create configmap for them, create 2 redis deployments and their respective services.\n\nUpdate the PVC size to your liking.\n\n```\nkubectl create configmap redis-conf --from-file=redis.conf\nkubectl create -f deployments/redis01.yaml\nkubectl create -f deployments/redis02.yaml\nkubectl create -f services/redis01.yaml\nkubectl create -f services/redis02.yaml\n```\n\n## Install twemproxy\n\nBuild the docker image for twemproxy from `twemproxy` folder.\n\nEdit twemproxy configuration\n\n```\nalpha:\n  listen: 0.0.0.0:22121\n  hash: murmur\n  distribution: ketama\n  auto_eject_hosts: true\n  redis: true\n  server_connections: 1\n  server_retry_timeout: 30000\n  timeout: 4000\n  server_failure_limit: 3\n  preconnect: true\n  servers:\n    - redis01:6379:1 redis01\n    - redis02:6379:1 redis02\n    # add more servers here\n```\n\nCreate the configmap, deployment and service for twemproxy\n\n```\nkubectl create configmap twemproxy-conf --from-file=twemproxy.yml\nkubectl create -f deployments/twemproxy.yaml\nkubectl create -f services/twemproxy.yaml\n```\n\n## Check the installation\n\nFire up an Ubuntu container and check if twemproxy is working as expected.\n\n```\nkubectl run -i --tty ubuntu --image=ubuntu --restart=Never /bin/bash\napt-get update \u0026\u0026 apt-get install -y redis-tools\nredis-cli -h twemproxy -p 22121\nset foo bar\nget foo\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuananh%2Fkubernetes-twemproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuananh%2Fkubernetes-twemproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuananh%2Fkubernetes-twemproxy/lists"}