Hi,
my question was just to identify the limitations and understand better the
architecture.
So, from what I understood, the ELF namespaces feature means that having
multiple instance of the same app (in threads, of course) is very likely
going to crash due to the possible use of the same symbols or maybe even
worse, not crash but work not as expected (app1 calling functionA from app2
instead of app1). Maybe with different apps the risk is lower but is still
there.
In my case isolation would not be a problem but this was a good point to
clarify.
Thanks again and BR,

F.


Il giorno gio 15 nov 2018 alle ore 12:02 Nadav Har'El <[email protected]> ha
scritto:

>
>
> On Thu, Nov 15, 2018 at 9:53 AM Francesco Iadanza <
> [email protected]> wrote:
>
>> Dear OSv community,
>> I am testing OSv and I am using the /app REST api to launch commands
>> (ffmpeg).
>> As far as I understand, the best scenario for OSv is a "microservice"
>> approach, one task/app per instance, but I stretched this a bit only to
>> understand the OSv architecture.
>> So I launched two/three concurrent executions of the same command in new
>> ELF namespaces and it seemed to work correctly.
>>
>> So my question is: would it be safe to run on a single OSv instance a
>> Java server + a MySQL server + httpserver for monitoring (or whatever else)?
>> Could you explain if there could be any problems if working like this or
>> address to some documentation that can clarify this (maybe add a note to
>> the official doc)?
>>
>
> As you noticed, it is often *possible* to run several different
> applications on a single OSv VM, simultaneously. Even when you use both the
> REST API server and ffmpeg, you run two different applications. In the
> past, we sometimes ran a JVM running an SSH server in parallel with some
> other application.
>
> However, while such combinations may be possible (and you should
> definitely try the combination which interests you), they are not
> guaranteed to work for any combination. The ELF namespaces feature mean
> that it's fine if the different applications accidentally have the same
> symbol names (global variables, functions, etc.). But other problems can
> happen when you try to run two different applications in the same process,
> which is what we do in OSv. Some things like, for example, signals, alarms,
> and file descriptors, are (currently, this can be fixed if we care enough)
> global to the entire OSv. Two applications that both need to set a SIGSEGV
> handler, use alarm(), or both assume they can use the fd number 3, will not
> manage to work together.
>
> Another issue you should consider is your isolation needs: OSv doesn't
> offer any isolation or security between the different threads it runs, so a
> misbehaving MySQL can read or write to the other JVM thread, and so on. You
> should only do this if you are fine with this. If you really need security
> and isolation between the different applications, the best way is to run
> them on separate VMs.
>
> Nadav.
>

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to