Web components run your application’s source code. Now, a single app can have multiple web components, each with their own code base, unique configuration, and DNS Alias. Each component has access to application databases, caches, and workers, and each is independently scalable.
Single web components are automatically created when you launch an app. Multiple web components are launched by including multiple web configurations in your Boxfile. During the next deploy, additional web components are created.
Example Web Components in the Boxfile
A Hybrid Scaling Model
An ecommerce store like Magento may have a heavy admin panel suited for few instances with higher RAM for large routines. The more optimized front-end and would benefit from more concurrency (instances) requiring less RAM. Dividing the admin panel and front-end into two separate web components makes each scalable for optimal performance, without overbuilding.
A front facing web application may need a special version of php with many php extensions. An api might be much slimmer, perhaps taking advantage of a newer PHP api and anonymous functions. Splitting the web application and api into separate web components makes each independently configurable to suit specific functions.
Two completely unrelated applications may need to share a database or key/value store. Instead of creating two separate apps, launch an additional web component. Host unique applications in complete isolation, yet share resources between them.
Simplicity and Organization
If you would like to keep your collaboration management and billing administration to a minimum, this allows multiple apps to be grouped within the same umbrella app namespace.
Managing the GIT Repo
Multiple web components introduce a unique workflow dynamic. Managing multiple applications in a single repo may become cumbersome. Creating each application as a git submodule, which may be managed separately. When the main repo is pushed, git submodules are automatically updated.
For more in-depth information, check out our Web Components guide.