Urgent.News

What's breaking now, across thousands of outlets.

Tech

Two apps one process

Running multiple applications within a single process can yield significant performance benefits compared to running them as separate processes. This approach eliminates the need to allocate separate resources such as thread pools, schedulers, heaps, GC, caches, and more for each application. Instead, these resources can be shared across all applications, reducing memory, thread usage, and contention. This can allow for running a larger number of applications within the same resources, improving overall performance.

Though this method might initially seem similar to using a reverse proxy, it is not. A reverse proxy would still require separate processes for each application, each having their own resources, whereas a single process approach shares resources among all applications. This leads to better performance and scalability.

One of the key advantages of this approach is the reduction in deployment overhead. Normally, deploying an application requires restarting the process, leading to downtime. However, by bundling all applications into a single process, deploying a new application becomes as simple as importing it and adding it to the list of applications. The entire project can be built into an uberjar and deployed with zero downtime. This is akin to a network blip, which is generally considered unnoticeable.

To illustrate this, the author has demonstrated a working example where three different applications are running within a single process on a modestly priced VPS. All three applications are sharing the same resources, showcasing the scalability and performance benefits of this approach.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at andersmurphy.com →

More in Tech

Steam Frame, 한 달 만에 5위 — VR이 '일상의 도구'가 된 날, 시각 트레이닝의 설계는 어떻게 바뀌는가

Steam Frame, 한 달 만에 5위 — VR이 '일상의 도구'가 된 날, 시각 트레이닝의 설계는 어떻게 바뀌는가 먼저, 뉴스부터 밸브의 최신 Steam 하드웨어 조사에 Steam Frame이 처음 등장했습니다. 발매한 지 약 한 달, 게다가 백오더가 계속되는 상황인데도 이미 '다섯 번째로 많이 쓰이는 헤드셋' 자리에 올랐습니다.

  • Steam Frame rose to fifth place within a month of launch
  • Amblyopia treatment expanded to VR with standalone headsets
  • Amblyotube software customizes visual therapy with AI features

More from Monday 9 November →