https://github.com/mason-leap-lab/infinicache Skip to content Sign up * Why GitHub? Features - + Code review + Project management + Integrations + Actions + Packages + Security + Team management + Hosting + Mobile + Customer stories - + Security - * Team * Enterprise * Explore + Explore GitHub - Learn & contribute + Topics + Collections + Trending + Learning Lab + Open source guides Connect with others + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing Plans - + Compare plans + Contact Sales + Nonprofit - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} mason-leap-lab / infinicache * Watch 5 * Star 115 * Fork 9 InfiniCache: A cost-effective memory cache that is built atop ephemeral serverless functions (FAST '20) mason-leap-lab.github.io/infinicache/ MIT License 115 stars 9 forks Star Watch * Code * Issues 3 * Pull requests 1 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights master 2 branches 1 tag Go to file Code Clone HTTPS GitHub CLI [https://github.com/m] Use Git or checkout with SVN using the web URL. [gh repo clone mason-] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio If nothing happens, download the GitHub extension for Visual Studio and try again. Go back Latest commit @wangaoone wangaoone Create LICENSE ... 7a0d63f Oct 23, 2020 Create LICENSE 7a0d63f Git stats * 366 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .idea update readme.md Mar 8, 2020 client Update main.go Mar 27, 2020 common Adjust directory organization and modulization Feb 6, 2020 deploy Add AWS region configuration. Mar 24, 2020 docs Bump lodash from 4.17.15 to 4.17.19 in /docs Jul 21, 2020 lambda Add AWS region configuration. Mar 24, 2020 migrator Adjust directory organization and modulization Feb 6, 2020 proxy Add AWS region configuration. Mar 24, 2020 .gitignore update deploy procedure and fixed bug Mar 8, 2020 LICENSE Create LICENSE Oct 23, 2020 Makefile Add more deployment instructions. Feb 12, 2020 README.md Update README.md Sep 27, 2020 go.mod Adjust dependency. Apr 26, 2020 go.sum Adjust dependency. Apr 26, 2020 install_go.md add intall_go.md Mar 8, 2020 View code README.md InfiniCache 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. Our USENIX FAST'20 Paper: InfiniCache: Exploiting Ephemeral Serverless Functions to Build a Cost-Effective Memory Cache Press: * IEEE Spectrum: Cloud Services Tool Lets You Pay for Data You Use--Not Data You Store * Mikhail Shilkov's detailed paper review: InfiniCache: Distributed Cache on Top of AWS Lambda (paper review) Change log * 03/07/2020: Updated deploy procedure and fixed the bug (incorrect path) in the scripts under deploy/. Prepare * EC2 Proxy Amazon EC2 AMI: ubuntu-xenial-16.04 Golang version: 1.12 Be sure the port 6378 - 7380 is avaiable on the proxy 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). * Golang install Jump to install_go.md * Package install Install basic package sudo apt-get update sudo apt-get -y upgrade sudo apt install awscli sudo apt install zip Clone this repo go get -u github.com/mason-leap-lab/infinicache Run aws configure to setup your AWS credential. aws configure * Lambda Runtime Lambda Role setup Go to AWS IAM console and create a role for the lambda cache node (Lambda function). AWS IAM console -> Roles -> Create Role -> Lambda -> AWSLambdaFullAccess, AWSLambdaVPCAccessExecutionRole, AWSLambdaENIManagementAccess Enable Lambda internet access under VPC Plese refer to this article. (You could skip this step if you do not want to run InfiniCache under VPC). * S3 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. * Configuration Lambda function create and config Edit deploy/create_function.sh and deploy/update_function.sh PREFIX="your lambda function prefix" S3="your bucket name" cluster=400 # number of lambda in the cache pool mem=1536 Edit destination S3 bucket in lambda/collector/collector.go, this bucket is for the bill duration log from CloudWatch. AWSRegion = "us-east-1" S3BUCKET = "your bucket name" Edit lambda/migrator/client.go, change AWS region if necessary. AWSRegion = "us-east-1" 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. ROLE = "arn:aws:iam::[aws account id]:role/[role name]" REGION = "us-east-1" ... ... subnet = []*string{ aws.String("your subnet 1"), aws.String("your subnet 2"), } securityGroup = []*string{ aws.String("your security group") } 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). export GO111MODULE="on" go get deploy/create_function.sh 60 Proxy configuration Edit proxy/server/config.go, change the aws region, cluster size, and prefix of the Lambda functions. const AWSRegion = "us-east-1" const NumLambdaClusters = 400 const LambdaPrefix = "Your Lambda Function Prefix" const ServerPublicIp = "" // Leave it empty if using VPC. Execution * Proxy server 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. make start 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. * Client library The toy demo for Client Library go run client/example/main.go The result should be ~$ go run client/example/main.go 2020/03/08 05:05:19 EcRedis Set foo 14630930 2020/03/08 05:05:19 EcRedis Got foo 3551124 ( 2677371 865495 ) Related repo Client library ecRedis Redis protocol redeo Benchmarking tool redbench To cite InfiniCache @inproceedings {246184, author = {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}, title = {InfiniCache: Exploiting Ephemeral Serverless Functions to Build a Cost-Effective Memory Cache}, booktitle = {18th {USENIX} Conference on File and Storage Technologies ({FAST} 20)}, year = {2020}, isbn = {978-1-939133-12-0}, address = {Santa Clara, CA}, pages = {267--281}, url = {https://www.usenix.org/conference/fast20/presentation/wang-ao}, publisher = {{USENIX} Association}, month = feb, } Contributing Please feel free to hack on InfiniCache! We're happy to accept contributions. About InfiniCache: A cost-effective memory cache that is built atop ephemeral serverless functions (FAST '20) mason-leap-lab.github.io/infinicache/ Resources Readme License MIT License Releases 1 tags Packages 0 No packages published Contributors 4 * @zhangjyr zhangjyr * @wangaoone wangaoone Ao * @tddg tddg Yue Cheng Languages * Go 99.1% * Other 0.9% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Help * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.