Deployment Flashcards

1
Q

What is a server?

A

A server handles requests and sends back some sort of reponse. In order to do so, a server is designed with much more processing speed, storage, and RAM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some web server components?

A

Server side:

1) Web Server - The web server receives a request from the client. The web server asks the logic unit to retrieve some content
2) Application - The logic unit receives requests from the web server. Its job is to run appropriate segments of your code according to the request’s instructions. If that code requires information from the database, the logic unit will retrieve that data before organizing it and sending back a response to the web server.
3) The database is simply a file or a container for document storage like your computer’s hard-drive. Its sole purpose is to store files, update files, and retrieve files according to instructions received from the interpreter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the process manager (green unicorn)?

A

Roles are:

1) Restart the app automatically if it crashes
2) Gain insights into runtime performance and resource consumption
3) Modify settings dynamically to improve performance
4) Load balancing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does gunicorn do?

A

Gunicorn is designed to handle incoming requests that will need to be routed to the interpreter. This includes any route you’ve added to urls.py . We’ll learn more about our other server, Nginx, which will be serving static files such as images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does gunicorn interat with your Django app?

A

WSGI.py is the created when you start a project. It;’s the glue that connects your Django app with gunicorn.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Local environments?

A

Chances are that when you deploy an app you’ve been developing in a local environment, you need to use some kind of process manager, regardless of the technology stack. Some common combinations include Unicon for Rails, pm2 for NodeJS, and Apache for PHP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Three basic functions you will need to set up whn you add Gunic

A

To add Gunicorn functionality:

1) needs to know which socket to connect to
2) what do to if a process fails
3) How many workers to setup

Armed with these instructions, Gunicorn takes over the job of ensuring that your app keeps running if an error occurs, directing traffic to the appropriate port, and running concurrent processes. In short, Gunicorn makes sure your deployment server runs more smoothly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly