LogoLogo
WinForms to WebPowerBuilder to .NETPowerBuilder to Java
  • WebMAP Documentation | Mobilize.Net
  • WinForms
    • Introduction
    • Getting Started
    • Conversion Process
    • Post-Conversion
    • Extend or Modify the Converted Application
      • NoWebMap Forms Winforms
        • How to add a new Form
        • Adding the created form to the migrated App
        • Interacting with the application data
        • Call the custom API
        • Interaction between the no webmap added Form and the WebMap components
      • Adding a component
      • Adding a component dynamically
      • Add a new control model
      • Switching CSS theme
      • Adding new window
      • Conversion Configuration
        • WebMAP configuration file
        • Stub Filter
      • Adding Non-WebMap Angular Forms
      • Adding FrontEnd Handler to a ToolStripMenuItem
      • Changing ToolStripButton icons
      • Adding new items to existing toolbar
      • Adding FrontEnd element properties and JS listeners
      • Adding FrontEnd output handlers
      • Access FrontEnd components
      • Create custom components based on existing WebMap Component
      • Override FrontEnd methods
    • Assessment Mode
    • Errors and Troubleshooting
      • How to resolve broken reference problems with VBUC
    • Portability
    • Glossary
    • Release Notes
    • Internal Demos
    • Known Issues
    • WinForms DCP
  • WebForms
    • Introduction
    • Overview
    • Desktop Compatibility Platform (DCP)
      • Pages and Master Pages
      • GridView and DataList data synchronization
      • HTTP objects
    • Post-Conversion
    • Extend or Modify the Converted Application
      • Adding FrontEnd validator
      • Adding Page
      • Adding MasterPage
    • Designer classes on WebForms Conversion Tool
    • Errors and Troubleshooting
      • How fix Solution when have been added website from filesystem without project file
    • Release Notes
  • PowerBuilder to .Net
    • Introduction
    • Getting Started
      • Conversion Tool
    • Desktop Compatibility Platform (DCP)
      • Data Manager
    • Reports
      • Report Rendering in Modernized Code
      • ReportWatcher Service Configuration
      • Data Manager to RDL Conversion
      • Reporting Service Internals
      • Troubleshooting
  • PowerBuilder to Java
    • Introduction
    • Getting started
    • Post-Conversion
      • Setup PBJava Environment
      • Architecture
      • App Start
    • Glossary
    • Errors
    • Glossary
    • FAQ
      • How to create a new Control
      • How to create a new Screen
      • What is the Mobilize.WebMAP.CoreServices.All?
      • What is the DesignerAttribute?
      • What is the InterceptedAttribute?
      • What is the InterceptedAttribute?
      • What is the ObservableAttribute?
      • What is the Mobilize.Weaving.WebMAPExtensions.All?
  • General
    • FrontEnd
      • Documentation
        • Webforms Angular Components
          • Web Components
            • Base Components
              • BaseValidator Component
            • KendoUI Components
              • CompareValidator
              • CustomValidator
              • RegularExpressionValidator
              • RequiredFieldValidator
              • ValidationSummary
          • Directives
          • AJAX Web Components
            • AjaxCalendar
            • AjaxModalPopupExtender
          • Ajax Interaction Services
        • Client Core
          • WebMap's Client Core
        • Angular Client
          • Introduction
          • WebMap Service
          • WebMap Interceptor Service
        • Base Components
          • Introduction
          • Components
            • Container
            • Control
            • ControlContainer
            • FormsContainer
            • Loading
            • Stub
        • Winforms Angular Components
          • Web Components
            • Base Components
              • Control Component
              • Form Container
              • Grid Component
              • Style
            • KendoUI Components
              • AdoDataControl
              • Button
              • C1TrueDBGrid
              • CheckBox
              • CheckedListBox
              • ComboBox
              • ContextMenuStrip
              • DataGridView
              • DataGridViewFlex
              • DateTimePicker
              • FileDialog
              • GroupBox
              • Label
              • ListBox
              • ListView
              • MaskedTextBox
              • MessageBox
              • NumericUpDown
              • Panel
              • PictureBox
              • PrintDialog
              • ProgressBar
              • RadioButton
              • RichTextBox
              • StatusStrip
              • Stup
              • TabControl
              • TabPage
              • TextBox
              • Timer
              • ToolStrip
              • TreeView
              • WebBrowser
              • Window
            • JQuery Web Components
          • WebMap FrontEnd Architecture
          • Migrated Structure
          • Setup
            • Front-End setup and compilation
            • Components Manual
            • Browser Support
            • Unit Test Manual
            • Development Process
            • Setup AOT/JIT Compilation
          • Decorators
            • Server Event
          • Conventions
            • Application Structure and NgModules
            • Coding
            • Components
            • Data Service
            • Directives
            • Lifecycle hooks
            • Names
            • Services
        • PowerBuilder Kendo Components
          • Base Components
            • base-component
            • column-control
            • controlcontainer
          • Data Manager Componets
            • base-data-manager
            • data-manager-control
            • data-manager-control-base
            • dw-checkbox
            • dw-column
            • dw-complexNumericMaskComponent
            • dw-compute
            • dw-date-time-edit-mask
            • dw-dropdowndatawindow
            • dw-edit
            • dw-edit-mask
            • dw-radio-button
            • dw-simple-numeric-edit-mask
            • dw-string-edit-mask
            • dw-time-edit-mask
          • Window Components
            • basemask
            • graphics
            • w-checkbox
            • w-command-button
            • w-complex-numeric-mask
            • w-date-time-edit-mask
            • w-dropdownlistbox
            • w-group-box
            • w-line
            • w-listbox
            • w-maskedtextbox
            • w-mdiclient
            • w-menu
            • w-multiline
            • w-picture
            • w-picture
            • w-radiobutton
            • w-rectangle
            • w-simple-numeric-edit-mask
            • w-single-line-edit
            • w-statictext
            • w-string-edit-mask
            • w-time-edit-mask
            • w-toolbar
            • w-toolbaritem
            • w-user-object
            • w-window
          • Services
            • DmInteractionService
          • DataManagerEvents
          • FocusManager guide
      • Api Documentation
        • WebMap Silverlight
        • WfNetC1Components
        • WebFormsComponents
      • Guides
        • Setup NPM package registry in the workspace
        • How to Setup WebMap Applications To Run Over SubDomains or WebApplications In IIS
        • Deploy several WebMap Apps in the same Server
        • Update to Angular 16
        • Appearance
          • How to change the CSS
          • How to override the style for a component
        • Component maintenance
          • How link WebMap package to the migrated Application
          • How to resolve broken reference problems with VBUC
          • How to test a local WebMap Components package
          • How to add a new component in a migrated application
          • How to update a component
          • Dynamic Control Support
          • How to add new set of component with a different provider
          • How to test your component in the playground
          • Tools
        • WMLogger
          • How to use the WMLogger's instance
          • How to change log's level
          • How to add log tags
        • Integration test
        • Setup WebMap Applications to Run Front-End And Back-End In Separates Sites
          • Setup WebMap Applications To Run Front-End And Back-End In Separates Sites in Production (IIS)
        • Setup Migrated WebMap Applications To Run Front-end & Back-end In Separates Sites (Only development)
        • Initial Set Up
          • Software to Install
          • Necessary Repositories
      • Errors
      • Version Notes
        • Client Core
        • Angular Client
        • Web Base Components
        • Winforms Angular Components
        • PowerBuilder Kendo Components
      • Licenses
        • Client Core
        • Angular Client
        • Base Components
        • PB Kendo Components
        • WFNet Kendo Components
        • WebForms Components
        • WFNet Access Components
        • WFNet Janus Components
        • WFNet C1 Components
        • Silverlight wms-framework
        • Silverlight i-components
    • BackEnd
      • WebMAP From Scratch
      • Setup
      • DCP: Desktop Compatibly Platform
        • Overview
        • Library Bundles
          • Bundle Library
            • Create an Observable Object
          • Bundle DTO
            • DTO: Data Transfer Objects
              • Creating a DTO
            • Mappers
              • Create Mappers
            • Observable Wrappers
              • Create an Observable Wrapper
            • API/Controllers
      • Architecture
      • Weaving on WebMAP
      • Glossary
      • FAQ
        • How to create a new Control
        • How to create a new Screen
        • What is the Mobilize.WebMAP.CoreServices.All?
        • What is the DesignerAttribute?
        • What is the InterceptedAttribute?
        • What is the Mobilize.Extensions.Logging.RollingFile?
        • What is the ObservableAttribute?
        • What is the Mobilize.Weaving.WebMAPExtensions.All?
      • Licenses
        • PBNet DCP
        • WebFormsDCP
        • WFNet DCP
        • CoreServices
        • CoreServicesCommon
    • Request and Response
  • SCALABILITY
    • Introduction
    • Microservices
    • Containerizing a WebMap .Net Application with Docker
    • Vertical scalability
Powered by GitBook
On this page
  • Prerequisites
  • Steps
  • Conclusion

Was this helpful?

  1. SCALABILITY

Vertical scalability

PreviousContainerizing a WebMap .Net Application with Docker

Last updated 6 months ago

Was this helpful?

Vertical scalability, also known as scaling up, refers to the process of increasing the capacity of a single server or system by adding more resources, such as CPU, memory (RAM), or storage. Instead of distributing the workload across multiple machines, vertical scaling enhances the power of one machine to handle more tasks.

Key features of vertical scalability:

  • Increased capacity: By upgrading the hardware (e.g., faster processors, more memory), a system can handle more data or users.

  • Single node: All processing and workload are managed on one server or machine.

  • Simplicity: Vertical scaling is simpler than horizontal scaling (adding more machines), as it avoids the complexity of distributed systems.

  • Limitations: There's a hardware limit to how much a machine can be upgraded. Once those limits are reached, vertical scaling is no longer feasible.

Vertical scalability is commonly used in scenarios where system architecture relies on a single server, but it can become expensive and has physical resource limitations compared to horizontal scaling.

Sources:

Here a simple sample of how it looks like a vertical scalability:

To carry out a vertical scalability using NGINX as load balancer and host our WebMap application with docker is the following:

Prerequisites

Before you begin, ensure you have the following:

  • Docker installed on your system.

  • Basic knowledge of Docker and containerization concepts.

  • The web applications you want to load balance running in separate containers.

Steps

  1. Set up docker environment

  1. Create NGINX Load Balancer Container

Before creating the NGINX Load Balancer Container, we need to create a local network into the docker in order to get a better response with the load balancer. Execute the following command:

docker network create -d bridge <NAME_NETWORK>

The name-network will be load-balancer

docker run -d -p <EXTERNAL_PORT>:<INTERNAL_PORT> --name <NGINX_NAME_CONTAINER> nginx

Explanation:

  • `-d`: Run the container in detached mode.

  • `-p <EXTERNAL_PORT>:<INTERNAL_PORT>`: Map port <EXTERNAL_PORT> on the host to port <INTERNAL_PORT> in the container.

  • `--name <NGINX_NAME_CONTAINER>`: Assign a name to the container.

  • `nginx`: Pull and run the official NGINX image.

  1. Configure NGINX for Load Balancing

NGINX configuration is essential for load balancing. You need to create an NGINX configuration file and mount it into the container.

Create an NGINX configuration file, for example: `nginx.conf`, with the load balancing settings. Below is a example to run a WebMAP app:

``` nginx.conf

http {
    map $http_upgrade $connection_upgrade {
        default upgrade;
        '' close;
    }
	
    upstream all {
		ip_hash; //Sticky session mode
		server webmap-test-1;
		server webmap-test-2;
		# Add as much as you want servers
    }

    server {
         location / {
              proxy_pass http://all/;
	      proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
	      proxy_set_header Connection $connection_upgrade;
	      proxy_set_header Host $host;
         }
    }

}

events {}

```

Now, start the NGINX container with the custom configuration file:

docker run -v /$(pwd)/nginx.conf:/etc/nginx/nginx.conf -d -p <EXTERNAL_PORT>:<INTERNAL_PORT> --network <NETWORK_NAME> nginx

- `-v /path/to/nginx.conf:/etc/nginx/nginx.conf`: Mount the configuration file into the container in read-only mode.

  1. Run Application WebMap Containers

Ensure that your backend application containers are running. Replace `webmap-test-1` and `webmap-test-2` in the NGINX configuration with the actual names or IP addresses of your application containers.

  1. Test Load Balancer

Access the NGINX load balancer through your web browser or a tool like `curl`. NGINX will distribute incoming requests to your backend servers in a round-robin fashion.

Test the load balancing:

You should see responses from your application containers indicating that the load balancer is working.

Conclusion

This setup can be easily expanded to include more backend servers and customize load balancing strategies to suit your application's needs.

If you haven't already, install Docker on your system. You can download it from . Once Docker is installed, start the Docker daemon.

In this step, we will create a NGINX container to act as a load balancer. You can use the from Docker Hub.

You can create a WebMap Container following these steps: .

Open the explorer and paste: :<EXTERNAL_PORT>

Docker engine
official NGINX image
Containerizing WebMap app
http://localhost
https://www.digitalocean.com/resources/articles/horizontal-scaling-vs-vertical-scaling
https://www.cloudzero.com/blog/horizontal-vs-vertical-scaling/#:~:text=of%20vertical%20scaling.-,What%20Is%20Vertical%20Scaling%3F,power%20to%20your%20current%20machines.
Architecture of vertical scalability using NGINX as a load balancer