Flashcards in Web Fundamentals Deck (16):
Describe what REST means to you? What are the four components of a RESTful API?
Directory structure, stateless, JSON or XML, uses HTTP protocol
HTTP status codes (200s, 300s, 400s, 500s)
200: mean the request is OK.
300: multiple choice - the server might see multiple index.html pages.
400: bad request - the server didn't understood the request
401: Unauthorized. The request requires user authentication.
403: forbidden - server understood the request but will not do it.
404: server didn't found the request URI
500: Internal server error - server encounter some kind of internal error
550: permission denied - means the account you are logged in as don't have permission to do a certain action.
What port localhost refers to ?
it means "this computer" refers to ip address: 127.0.0.1 - usually port 80 is the standard.
What port is HTTP, HTTPS, and SSH ?
HTTP: 80 - HyperText Transfer Protocol
HTTPS: 443 - Secure HyperText Transfer Protocol
SSH: 22 - Secure Shell Service
Difference between UDP and TCP ?
UDP - Sends data faster by no worrying about errors, and rather jsut keep sending pockets of data - mostly used for online games or online broadcasting.
TCP - more reliable and used the most, the data pockets are tracked so that no data is lost.
Difference between server and client side rendered pages ?
1. Full page reloads before sending the webpage to the client.
2. Great for Static Sites.
3. Initial page load is faster
4. Easier SEO
3. Harder SEO since page loads dynamically.
Why do we use API keys ?
To Identify the app or the project that's making a call to the API. Also if you want to control the number of calls made to the API, or keep some kind of logs or traffic patterns. They are not considered Secure.
What is DNS ?
Domain Name Servers. your Internet Service Provider views the domain name you requested and , translates it into a machine friendly IP address (for example 126.96.36.199 and directs your Internet connection to the correct website.
What is a load balancer and what does it do?
A load balancer acts as the “traffic cop” sitting in front of your servers and routing client requests across all servers capable of fulfilling those requests in a manner that maximizes speed and capacity utilization and ensures that no one server is overworked, which could degrade performance. If a single server goes down, the load balancer redirects traffic to the remaining online servers. When a new server is added to the server group, the load balancer automatically starts to send requests to it.
What is the purpose of CDNs ?
Content Delivery Networks
They use Distributed Data Centers which are all over the world so if your server is in US and is being accessed in Asia, thats a big distance a CDN closer to Asia would have access to your file instead making the request a lot faster.
What is the purpose of caching ?
What does the CPU, RAM, Hard Drive, GPU do in a computer ?
what are websockets ?
Difference between in memory and disk storage ?
What are JWTs ?