{"id":13514028,"url":"https://github.com/ds2-lab/infinicache","last_synced_at":"2025-04-09T18:19:55.370Z","repository":{"id":40190392,"uuid":"231708834","full_name":"ds2-lab/infinicache","owner":"ds2-lab","description":"InfiniCache: A cost-effective memory cache that is built atop ephemeral serverless functions (USENIX FAST'20)","archived":false,"fork":false,"pushed_at":"2023-03-03T16:12:48.000Z","size":139626,"stargazers_count":254,"open_issues_count":5,"forks_count":21,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-09T18:19:39.179Z","etag":null,"topics":["caching","serverless"],"latest_commit_sha":null,"homepage":"https://ds2-lab.github.io/infinicache/","language":"Go","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/ds2-lab.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":"2020-01-04T04:34:16.000Z","updated_at":"2024-11-28T16:34:36.000Z","dependencies_parsed_at":"2024-06-20T05:59:09.949Z","dependency_job_id":null,"html_url":"https://github.com/ds2-lab/infinicache","commit_stats":null,"previous_names":["mason-leap-lab/infinicache"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ds2-lab%2Finfinicache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ds2-lab%2Finfinicache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ds2-lab%2Finfinicache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ds2-lab%2Finfinicache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ds2-lab","download_url":"https://codeload.github.com/ds2-lab/infinicache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085325,"owners_count":21045139,"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":["caching","serverless"],"created_at":"2024-08-01T05:00:43.808Z","updated_at":"2025-04-09T18:19:55.346Z","avatar_url":"https://github.com/ds2-lab.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# InfiniCache\n\n**InfiniCache** is the first-of-its-kind, cost-effective, and high-performance, in-memory object cache that is built atop ephemeral cloud functions. InfiniCache is 31x - 96x cheaper than traditional cloud cache services.\n\nOur USENIX FAST'20 Paper: [InfiniCache: Exploiting Ephemeral Serverless Functions to Build a Cost-Effective Memory Cache](https://www.usenix.org/conference/fast20/presentation/wang-ao)\n\n\n### Press:\n* IEEE Spectrum: [Cloud Services Tool Lets You Pay for Data You Use—Not Data You Store](https://spectrum.ieee.org/tech-talk/computing/networks/pay-cloud-services-data-tool-news)\n* Mikhail Shilkov's detailed paper review: [InfiniCache: Distributed Cache on Top of AWS Lambda (paper review)](https://mikhail.io/2020/03/infinicache-distributed-cache-on-aws-lambda/)\n\n## Change log\n\n- **03/07/2020:** Updated deploy procedure and fixed the bug (incorrect path) in the scripts under `deploy/`.\n\n## Prepare\n\n- ### EC2 Proxy\n\n  Amazon EC2 AMI: ubuntu-xenial-16.04\n\n  Golang version: 1.12\n\n  Be sure the port **6378 - 7380** is avaiable on the proxy\n\n  We recommend that EC2 proxy and Lambda functions are under the same VPC network, and deploy InfiniCache on a EC2 instance with powerful CPU and high bandwidth (`c5n` family maybe a good choice).\n\n- ### Golang install\n\n  Jump to [install_go.md](https://github.com/mason-leap-lab/infinicache/blob/master/install_go.md)\n\n- ### Package install\n\n  Install basic package\n  ```shell\n  sudo apt-get update\n  sudo apt-get -y upgrade\n  sudo apt install awscli\n  sudo apt install zip\n  ```\n\n  Clone this repo\n  ```go\n  go get -u github.com/mason-leap-lab/infinicache\n  ```\n\n  Run `aws configure` to setup your AWS credential.\n\n  ```shell\n  aws configure\n  ```\n\n- ### Lambda Runtime\n\n  #### Lambda Role setup\n\n  Go to AWS IAM console and create a role for the lambda cache node (Lambda function).\n\n  AWS IAM console -\u003e Roles -\u003e Create Role -\u003e Lambda -\u003e\n\n  **`AWSLambdaFullAccess, `**\n\n  **`AWSLambdaVPCAccessExecutionRole, `**\n\n  **`AWSLambdaENIManagementAccess`**\n\n  #### Enable Lambda internet access under VPC\n\n  Plese [refer to this article](https://aws.amazon.com/premiumsupport/knowledge-center/internet-access-lambda-function/). (You could skip this step if you do not want to run InfiniCache under VPC).\n\n- ### S3\n\n  Create the S3 bucket to store the zip file of the Lambda code and data output from Lambda functions. Remember the name of this bucket for the configuration in next step.\n\n\n- ### Configuration\n\n  #### Lambda function create and config\n\n  Edit `deploy/create_function.sh` and `deploy/update_function.sh`\n\n  ```shell\n  PREFIX=\"your lambda function prefix\"\n  S3=\"your bucket name\"\n  cluster=400 # number of lambda in the cache pool\n  mem=1536\n  ```\n\n  Edit destination S3 bucket in `lambda/collector/collector.go`, this bucket is for the bill duration log from CloudWatch.\n  ```go\n  AWSRegion = \"us-east-1\"\n  S3BUCKET = \"your bucket name\"\n  ```\n\n  Edit `lambda/migrator/client.go`,  change AWS region if necessary.\n  ```go\n  AWSRegion = \"us-east-1\"\n  ```\n\n  Edit the aws settings and the VPC configuration in `deploy/deploy_function.go`. If you do not want to run InfiniCache under VPC, you do not need to modify the `subnet` and `securityGroup` settings.\n\n  ```go\n  ROLE = \"arn:aws:iam::[aws account id]:role/[role name]\"\n  REGION = \"us-east-1\"\n  ...\n  ...\n  subnet = []*string{\n    aws.String(\"your subnet 1\"),\n    aws.String(\"your subnet 2\"),\n  }\n  securityGroup = []*string{\n    aws.String(\"your security group\")\n  }\n  ```\n\n  Run script to create and deploy lambda functions (Also, if you do not want to run InfiniCache under VPC, you need to set the `vpc` flag to be `false` in `deploy/create_function.sh`).\n\n  ```shell\n  export GO111MODULE=\"on\"\n  go get\n  deploy/create_function.sh 60\n  ```\n\n  #### Proxy configuration\n\n  Edit `proxy/server/config.go`, change the aws region, cluster size, and prefix of the Lambda functions.\n  ```go\n  const AWSRegion = \"us-east-1\"\n  const NumLambdaClusters = 400\n  const LambdaPrefix = \"Your Lambda Function Prefix\"\n  const ServerPublicIp = \"\"  // Leave it empty if using VPC.\n  ```\n\n## Execution\n\n- Proxy server\n\n  Run `make start` to start proxy server.  `make start` would print nothing to the console. If you want to check the log message, you need to set the `debug` flag to be `true` in the `proxy/proxy.go`.\n\n  ```bash\n  make start\n  ```\n\n  To stop proxy server, run `make stop`. If `make stop` is not working, you could use `pgrep proxy`, `pgrep go` to find the pid, and check the `infinicache pid` and kill them.\n\n- Client library\n\n  The toy demo for Client Library\n\n  ```bash\n  go run client/example/main.go\n  ```\n\n  The result should be\n\n  ```bash\n  ~$ go run client/example/main.go\n  2020/03/08 05:05:19 EcRedis Set foo 14630930\n  2020/03/08 05:05:19 EcRedis Got foo 3551124 ( 2677371 865495 )\n  ```\n\n## Related repo\n\nClient library [ecRedis](https://github.com/mason-leap-lab/infinicache/tree/master/client)  \nRedis protocol [redeo](https://github.com/mason-leap-lab/redeo)  \nBenchmarking tool [redbench](https://github.com/wangaoone/redbench)  \n\n## To cite InfiniCache\n\n```\n@inproceedings {246184,\nauthor = {Ao Wang and Jingyuan Zhang and Xiaolong Ma and Ali Anwar and Lukas Rupprecht and Dimitrios Skourtis and Vasily Tarasov and Feng Yan and Yue Cheng},\ntitle = {InfiniCache: Exploiting Ephemeral Serverless Functions to Build a Cost-Effective Memory Cache},\nbooktitle = {18th {USENIX} Conference on File and Storage Technologies ({FAST} 20)},\nyear = {2020},\nisbn = {978-1-939133-12-0},\naddress = {Santa Clara, CA},\npages = {267--281},\nurl = {https://www.usenix.org/conference/fast20/presentation/wang-ao},\npublisher = {{USENIX} Association},\nmonth = feb,\n}\n```\n\n\n## Contributing\n\nPlease feel free to hack on InfiniCache! We're happy to accept contributions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fds2-lab%2Finfinicache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fds2-lab%2Finfinicache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fds2-lab%2Finfinicache/lists"}