Microsoft Cloud Account Recharge: Use Azure App Service to quickly host your. NET / Java Core Web Application
In the modern IT architecture of large Internet factories or overseas start-up teams, there is a "family bucket" task that makes back-end development and operation maintenance a big deal when it comes to mind:
Server on-line deployment.
It doesn't matter if you're using a Microsoft pro-son.
.NET 8/9
, or enterprise-class veteran backbone
Java Spring Boot
In order to push the written core Web application to the public network, the traditional whole process is desperate: first turn on the virtual machine (the virtual machine needs to be patched and anti-virus), configure the complex Nginx reverse proxy and SSL certificate, toss about the Runtime dependent versions in different environments, and then carefully write the CI/CD automation pipeline. Finally, you have to worry every day:
If the advertisements explode and the traffic soars tenfold tomorrow, will my server be able to hold up? Do I have to get up late at night to expand the virtual machine?
With this set of workshop-style operation and maintenance, half of the development team's energy is often involved in the daily pulling of the underlying server, and there is no way to focus on writing core business code.
In Microsoft's cloud native ecosystem, there is a "full-blood full-hosting workbench" dedicated to saving the development team from this kind of server misery "--
Azure App Service (App Service)
.
Its core logic is very overbearing and pure:
Serverless (PaaS) deployment.
You don't need to manage any operating system, don't configure Nginx, don't worry about hardware. All you have to do is write it. NET compilation package or Java JAR/WAR package is thrown up, Azure will parachute a top-level Web running environment with global load balancing, high-security firewall, and can automatically change dozens of machines horizontally according to traffic.
Today, we reject any official preaching and rhetoric. We start directly from the actual combat of hard core. We will take you hand in hand to use the standard of large factory level and put you in 10 minutes. NET / Java core web applications are elegantly hosted to the cloud.
The first stage: deep disassembly, App Service's "two-layer minimalist world model"
Before you go to the Microsoft console and click the mouse, you must build a physical operating model of the underlying App Service in your mind. Many people come up with chaos because they don't understand the relationship between "package" and "stall.
Subgrade: App Service Plan: This is your "base of computing power". It represents the number of CPU cores, memory size, and hardware bandwidth you actually buy in Microsoft's computer room (such as a 2-core 8G Linux environment). You can think of it as a high-performance bus.
Upper Application: App Service (specific web application): This is your code entity. Most importantly, an App Service on the Plan base can be mounted and run well at the same time.
Several different web applications (App Service). Just like that bus, you can sit in it at the same time. NET front-end website, Java background API, and a beta H5 page. As long as the underlying memory does not explode, they completely share the underlying computing power and do not require you to pay a penny more for hardware.
The second stage: actual combat exercise -10 minutes to build high-rise buildings on the ground, batch hosting applications
We take the most mainstream of the current big factory
Linux Containerized/Managed Runtime Environment
For example, the boot drop disk is completed on Azure.
Log in
Azure portal
, search and enter
“App Services”
Page.
Step 1: Fill in the escrow "birth certificate"
Click the top
"Create” -> “Web App”
:
Project Details: Select your subscription and create a clean resource group rg-web-prod.
Name (Application Name): Give your website a unique English name in the world (such as my-core-api-2026), and it will automatically my-core-api-2026.azurewebsites.net a free secondary domain name officially provided by Microsoft.
Publish (Publishing Method): Select Code (Direct Code Package).
Runtime stack (runtime environment stack): This is the most critical code alignment. If you are. NET development, decisive choice. NET 8 (LTS) or the latest version. If you are a Java Daniel, select Java 17 or Java 21 accurately, and the Web server stack will Embedded Web Server (for the embedded Tomcat JAR package deployment that Spring Boot comes with).
Operating System: choose Linux with your eyes closed, the fastest running speed and the highest cost performance.
Region: Select the region closest to your buyer (e. g. East Asia Hong Kong or Southeast Asia Singapore).
Step 2: Pick Your Heavy Fire Base (App Service Plan)
Slide down the page to the Pricing plan billing layer.
Click "Explore pricing plans" and never choose the default expensive business package.
Novice Pit Avoidance Guide: During the development and testing phase, strictly select the Basic (B1) specification or the Premium v3 (P0v3) specification. Both of them not only bring their own test quota perfectly, but also have independent physical memory, which can withstand the basic concurrency and will never generate high idle bills.
Click Next, straight
until the creation is complete. In about 30 seconds, Microsoft's serverless base will be fully automatically welded to the cloud.
The third stage: witness the scene of the miracle-hands off the console, a key code lightning on the cloud
When the base is set up, how do we send the code from the local IDE (such as VS Code, IntelliJ IDEA or Visual Studio)?
App Service provides an extremely smooth and development-friendly fully automated deployment channel. Today we introduce a minimalist genre of big factories that don't need to write any Jenkins scripts--
Git/GitHub one-click trigger
.
Miracle Moment: Code as Deployment (Deployment Center)
On the App Service details page, find Deployment Center in the left menu.
Source: Do not hesitate to select GitHub in the drop-down menu.
Complete your GitHub account authorization, and then accurately check your deposit. NET or Java source code and the main branch.
Click Save.
At the moment of clicking save, a miracle happened:
Azure will automatically write a set of high-precision for you in the background.
GitHub Actions automated compilation pipeline
.
If you now cut back to your GitHub repository for a look, you'll see that the Actions has automatically pulled up a little rocket. It will be automatically executed in the cloud.
dotnet build
or
mvn clean package
Pack up your code. The moment the package is completed, the clean binary package will be automatically photographed into the Web container of Azure edge machine room.
Open the browser and directly enter the domain name Microsoft just gave you:
https://my-core-api-2026.azurewebsites.net/
Yours. NET or Java welcome page is already full of blood online, open the door to pick up guests. The whole process did not type any Nginx configuration, did not touch the network card of Linux virtual machine, everything was as smooth as breathing.
The fourth stage: the history of avoiding the pit and tears under the commercial-grade high concurrent architecture.
After this hosting scheme ran, the development experience was so refreshing that it flew up. But to survive in the real enterprise-class high-traffic, rigorous commercial audit battlefield, as the chief architect, you must immediately make a second reinforcement of the configuration to prevent the following two "invisible traps" brought about by full hosting ":
1. The deadly "first cold start turtle speed" hidden danger (Cold Start)
Many novices happily demonstrated to the boss after they were online. As a result, when the boss clicked on the web page for the first time on his mobile phone, he got stuck in a full circle on the white screen interface.
5 seconds to go in. The boss was livid and the developer was secretly complaining.
Reason dismantling: in the default hosting mechanism, if your website is not visited by anyone for several hours in the middle of the night, App Service will be extremely clever to "physically sleep and power off" the back-end Web container in order to help you save money ". When the first user suddenly knocks on the door the next day, Azure must pull up the running environment and decompress your Java/ . NET binary package, this process takes several seconds, this is the terrible "cold start (Cold Start)".
Architect standard death-free gold medal: enter your App Service console and click "Configuration" (configuration) -> "General settings" (general settings) on the left. One-click welding death: find a switch called "Always On" (keep awake) and change it to "On" without hesitation ". Click Save. With this strategy, Microsoft will arrange a robot to automatically help you keep the web page "hot" in the background every few seconds to ensure that your web application is always in a state of full blood standby. whenever users around the world click in, it will be absolutely open in seconds.
2. Beware of the tragedy of "database connection pool is pinched to death instantly"
When your business suddenly encounters a burst of orders and traffic soars tenfold, App Service
Autoscale (Auto Zoom)
Triggered, 10 machines were automatically changed horizontally from one machine to divert, and the front end was as stable as Mount Tai. But a few seconds later, your back-end
MySQL / PostgreSQL database directly on the spot brain death, complete paralysis.
Insider exposure: because every time a new machine is changed out of the front end,. NET or Java applications will apply to the back-end database to establish 100 initial connections by default. Ten machines are 1000 high-frequency connections, which will instantly explode the upper limit of the single-machine connection pool of the back-end database.
Hardcore Protection Reinforcement Specification: Code Layer Locking: In Your. NET appsettings.json connection string, or Java Spring application.yml database configuration, strictly limit Max Pool Size = 20 (the maximum number of single machine connections is set to 20). Let the front end no matter how many machines are changed horizontally, the request for the database is within the absolute safe budget control. Using a reasonable architecture to avoid the chain reaction brought about by full hosting is the highest accomplishment of mature DevOps.
Summary
Using Azure App Service to quickly host core web applications, the core industrial essence is actually simplified into 16 words:
The base is shared, the code is compiled, the whole line is maintained, and the rear end is locked.
You said goodbye to the past and gave it every day.
Linux virtual machines are patched, scared of hardware black swans, and human flesh gets up late at night to change the original workshop of Nginx configuration. All the complicated infrastructure and high-level defense tasks are completely entrusted to the top Serverless brains of Yunda Factory. Sitting in front of the computer, you just need to use all your thoughts to polish yours. NET / Java business code logic, write a
git push
, the rest of the things, to the speed of light flashing cloud native era.
