Commit 7aed7ce7 authored by Santhosh Kumar's avatar Santhosh Kumar

Add README.md

parent f5bc193e
Functions as a Service (FaaS) Implementation
This repository contains an implementation of Functions as a Service (FaaS) using Docker and Kubernetes. The implementation includes functionalities for deploying, scaling, and managing serverless functions within a Kubernetes cluster.
Directory Structure
The repository is structured as follows:
docker: Contains Docker-related files for building Docker images.
setup: Scripts for setting up Docker on worker nodes.
setup-master: Scripts for setting up Docker on the master node.
src: Contains the Python implementation of the FaaS platform.
examples: Example function implementations for testing and demonstration purposes.
example1: Basic example function.
example2: Example function demonstrating autoscaling functionality.
Usage
To reproduce and test the FaaS implementation, follow these steps:
Build Example2 Image: Navigate to the examples/example2 directory and build the Docker image using the provided Dockerfile.
bash
cd examples/example2
docker build -t example2 .
Deploy Container: Deploy the Docker container containing Example2 function to the Kubernetes cluster.
bash
kubectl apply -f deployment.yaml
Setup Scaling: Use the provided setup script to configure autoscaling for the Example2 function.
bash
./setup_scaling.sh
Test Autoscaling: Use curl commands to trigger CPU and memory-intensive tasks and observe the scaling behavior.
CPU Usage: Trigger CPU-intensive task with specified CPU percentage.
bash
curl -X GET http://<cluster-ip>:5000/occupy_cpu/10
Memory Usage: Allocate memory with specified memory size in MBs.
bash
curl -X GET http://<cluster-ip>:5000/allocate_memory/10
Replace <cluster-ip> with the actual IP address of your Kubernetes cluster.
Contributing
Contributions to this project are welcome! Feel free to submit bug reports, feature requests, or pull requests to help improve the FaaS implementation.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment