Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the function of PaaS?

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Today, the editor will share with you the relevant knowledge about the role of PaaS. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

In a word, today's applications are too complex from source code to run-time, and there is no standard, general-purpose way. The whole process and output are as follows:

Development phase: source code

Construction phase: release package / executable program

Deployment phase: runnable images (release package + configuration)

Run phase: process, cluster, log, monitoring information, network

The goal of both Deis,Heroku,Flynn and other PaaS is to make the 2-4 phases as simple as possible. After looking at the products they designed, how simple is it? Through a client command line tool, the following is implemented:

Develop to build:

Users submit source code through git, and PaaS automatically builds images and provides version management-users can create new versions (submit new code or modify deployment configuration), roll back old versions, and so on.

Deploy to run:

Automatically select the running machine, start a separate container for each process replica deployment, solve request routing and load balancing, and provide process management-users can scale up, view logs, monitor status, etc., and roll back history

# Why these features? Why can't these functions be implemented by various tools?

In my opinion, the code consists of two axes from release to run.

# # Vertical axis: source code-release package-runnable image-process

The relationship here is step by step, down in order, no matter what tool or platform you use, these four steps are pipelined downward.

# # horizontal axis: load balancing, expansion and reduction of cluster deployment, health check, log

For online applications, there are the following situations

Release new features: full update and deployment

Performance stress: expand and reduce capacity through health check or manual trigger

Ensure business continuity: in the above update, import the new request into the updated container through load balancing and wait for the old one to be updated

Therefore, the above four items are linked together and are horizontally related to each other. If these four functions are not provided in one tool at the same time, it is necessary to manually fill in the information interaction and manually integrate the four tools, thus bringing complexity.

# constraint and implementation

# # Vertical compilation: buildpack

Buildpack fills out the hole from the source code to the release package, which is a set of compilation scripts.

The PaaS platform provides some compilation scripts itself, but it also allows users to write their own compilation scripts according to the specification.

(the script needs to download the appropriate version of the compiler itself! )

If you use Docker, the user provides a DockerFile or Dockerimage address and takes something that you can run directly.

# # Vertical Operation: Procfile

Buildpack lets PaaS know how to compile the program, and Procfile lets PaaS know how to run the program.

A typical Procfile is like this.

Cat. / Procfile web: bundle exec rails server-p $PORT

Later, you can dynamically expand the program through the command line.

Deis ps:scale web=4

# # Vertical configuration: release packages run by environment variables have different configurations in different environments. Deis is done through environment variables. Once the environment variables are set on the command line tool on the client side, they are sent directly to all containers, reset them, and then restart.

# # horizontal load balancing: nginx

# # horizontal logging: centralized syslog acquires logs

# # horizontal deployment: Mini Program written by go, used to deploy Container of Docker

These are all the contents of this article "what is the purpose of PaaS?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report