Code Monkey home page Code Monkey logo

k8s-wasm-demo's Introduction

Kubernetes Wasm Demo

License Ruby Style Guide visitors

Summary

WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine. The main goal is to enable high-performance applications on web pages, "but it does not make any Web-specific assumptions or provide Web-specific features, so it can be employed in other environments as well." It is an open standard and aims to support any language on any operating system, and in practice all of the most popular languages already have at least some level of support.

"WebAssembly, that defines a portable, size- and load-time-efficient format and execution model specifically designed to serve as a compilation target for the Web." - Luke Wagner

WasmEdge is a lightweight, high-performance, and extensible WebAssembly runtime for cloud native, edge, and decentralized applications.

This project provides an End-to-End code to test an application that uses WasmEdge runtime in Kubernetes.

Metrics

The following table shows the sample taken from the 95 percentile values of a single execution, those values can vary.

Metric Name Description Rust Wasm
http_req_blocked Time spent blocked (waiting for a free TCP connection slot) before initiating the request. 5.18ms 460.62µs
http_req_connecting Time spent establishing TCP connection to the remote host. 5.13ms 387.23µs
http_req_receiving Time spent receiving response data from the remote host. 6.36ms 413.08µs
http_req_sending Time spent sending data to the remote host. 2.86ms 246.45µs
http_req_waiting Time spent waiting for response from remote host (a.k.a. “time to first byte”, or “TTFB”). 28.56ms 69.13ms

Surprisingly, the waiting time for response in WASM is longer than Rust.

Virtual Machines

The Vagrant tool can be used for provisioning an Ubuntu Focal Virtual Machine. It's highly recommended to use the setup.sh script of the bootstrap-vagrant project for installing Vagrant dependencies and plugins required for this project. That script supports two Virtualization providers (Libvirt and VirtualBox) which are determine by the PROVIDER environment variable.

curl -fsSL http://bit.ly/initVagrant | PROVIDER=libvirt bash

Once Vagrant is installed, it's possible to provision a Virtual Machine using the following instructions:

vagrant up

The provisioning process will take some time to install all dependencies required by this project and perform a Kubernetes deployment on it.

k8s-wasm-demo's People

Contributors

dependabot[bot] avatar electrocucaracha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.