To answer @rmescandon, this isn’t available in snapd today. I agree with @diddledani in terms of default operation because even with well-intentioned limits it is very difficult to setup something that is useful on every system since snaps can run on embedded all the way up to huge server systems.
Today snapd doesn’t do anything with resource control in the manner described, but it could (and yes, it would need to be done with cgroups). Perhaps it would be done via ‘snap run’ which should approximate what docker is doing. Perhaps it would be configurable via a new 'snap ’ or influenced by the gadget snap. AIUI, resource controls are planned in the longer term, but what it would look like and how it operates needs design.