Code Monkey home page Code Monkey logo

Comments (10)

alexellis avatar alexellis commented on May 20, 2024

Hi it's not supported at present. A number of features will not be available in faasd.

What's the usecase you have with regards to the limiting and what would you expect to happen if that was exceeded?

from faasd.

enkov avatar enkov commented on May 20, 2024

Hello!
I want to limit ram of function and if function exceed it, kill function. I thought it would work like in kubernetes, if limit reached OOM killer kills app.
And if I am right containerd can set limits.
Can You tell will it be available some day?

from faasd.

alexellis avatar alexellis commented on May 20, 2024

Once killed are you expecting it to be restarted?

What specific workload are you running right now? Also 1MB of RAM isn't that realistic, so I'm wondering if this is a genuine need or more because that's just what you expected? The answer will help us triage the request

from faasd.

enkov avatar enkov commented on May 20, 2024

Once killed I expect what function will be restarted and can be called again because there can be different input data.
I want to start users code and want to limit it.
1MB RAM is a test example for testing limits. For the real workload, I will set bigger values for RAM.

from faasd.

alexellis avatar alexellis commented on May 20, 2024

Ok, got it. What are you specifically wanting to use faasd with at the present time?

from faasd.

enkov avatar enkov commented on May 20, 2024

I need a solution that can run in kubernetes and on baremetal. After some research, I found that openfaas is the best solution because it can be deployed on baremetal with faasd.

from faasd.

alexellis avatar alexellis commented on May 20, 2024

OK I don't think I'm asking correctly or maybe you are not so keen to share - but do you have a use-case, if so what? (languages, usage of it, application, events, other requirements etc?)

from faasd.

enkov avatar enkov commented on May 20, 2024

My use case is to let users start their scripts for some calculations.
Data for these scripts will come from different sources(database, queue).
And I don't know how good these scripts work with memory and I want to limit them, so one script will not use all available resources.
Most of the scrips will use python3.

from faasd.

alexellis avatar alexellis commented on May 20, 2024

Is this a multi-tenant environment then? I would be very careful of using faasd for that, since it has no isolation or way of blocking a container running as root (at present)

You may prefer openfaas on Kubernetes backed by gVisor or Kata containers. You'll also find the requests/limits there.

But, for anyone landing here: we will look into container limits for faasd. Contributions are welcome :-)

from faasd.

alexellis avatar alexellis commented on May 20, 2024

This code could be of use to us from Michael’s boss project. I can see a way to set a limit, but not sure if “requests” is a containerd or K8s concept. @AkihiroSuda do you know?

https://github.com/crosbymichael/boss/blob/bbbfd63bba42337c0dbfa073a14ac7e8d91bf525/opts/opts.go#L152

from faasd.

Related Issues (20)

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.