Heroku Flashcards

1
Q

dependency management tools

A

Ruby - Bundler

Java - Ivy

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

How do you create an application on Heroku?

A

heroku create
creates an application on Heroku that is ready for our code
and
attaches a git remote to our local codebase

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

how do you deploy on Heroku?

A

git push Heroku master

  • pushes the code to Heroku
  • identifies it
  • runs a build process against it making it ready for deployment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how can you run the application on Heroku?

A

Heroku open

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

key segments of the Heroku platform

A

1-routers - to send user requests (to the applications)
2-dynos - a container where your application runs
3-

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

what is a dyno?

A
  • an isolated, virtualized Unix container where your application runs
  • holds our code and configuration, logplex,
  • the more running instances of your application are available to take requests
  • each dyno is completely isolated from other dynos
  • you can add dynos to extend capacity and achieve fault tolerance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

stateless web apps

A

-

-recommended because Heroku stops dynos that have slowed or failed and also restarts each dyno every 24 hours

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

environment variables

A

config vars

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

what is slug compilation?

A

the process of getting application code into the dyno

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

what is a release in Heroku?

A

a combination of your application code (or slug) and the configuration around it

  • any change to either of these will generate a new release
  • this definition of release makes it possible to roll back to previous versions of your code and the configuration surrounding it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is scaling out (horizontal scaling) as opposed to scaling up (vertical scaling)?

A
  • scaling up implies increasing the server capacity

- scaling out implies adding more servers for capacity rather than more capacity to the server

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

Heroku Postgres add-on

A

provides PostgresQL services to all applications

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

Heroku deployments

A
  • transforms your code into a platform-friendly version that can be scaled up and down instantly and at will
  • alters your application to suit the platform, injecting components and configuration
  • carried out by Git source control system
  • a push into the master branch initiates a deploy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the difference between speed and throughput?

A
  • speed is how fast your application can take a request and return a single response
  • throughput is how many simultaneous requests can be handled at the same time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is CDN?

A

-Content Delivery Network
-made up of many different machines that are spaced across the globe and are geolocation aware
-

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

N+1 problem

A
  • when we make a call to the database for each of a person’s friends, for example. This means we make N calls for N friends plus 1 call for the original person.
  • Instead, call all of the friends at once and keep them in cache?
17
Q

preemptive loading

A
  • using a join to preemptively grab all of the data that we know we will eventually need
  • solution for the N+1 problem
18
Q

Postgres Explain function

A

-a built in function that can be invoked in a query that returns the plan and execution time of the query

19
Q

What are Memcache and Memcachier?

A

-Two add-ons that both provide access to a volatile store called memcache

20
Q

What do services like New Relic do?

A
  • provides our apps SQL log data and other backend performance characteristics in near real time with easy-to-understand formatted graphs
  • many languages and frameworks have instrumentation that allows a client running on production machines to measure and report to these services
21
Q

External performance tools - backend

A

-

22
Q

External performance tools - frontend-

A

-

23
Q

latency

A

-

24
Q

what is fork?

A

-a way of cloning an application from one location into anothr

25
Q

What database does Heroku use?

A

PostgreSQL

26
Q

How do you provide for Rails to talk to Postgres?

A
add the pg gem in the production environment
$ group :production do
    gem 'pg'                    '0.17.1'
    gem 'rails_12factor'  '0.0.2'
end

run bundle install with a special flag to prevent the local installation of any production gems (like these)
$ bundle install –without production
rails_12factor is a gem used by Heroku to serve static assets such as images and style sheets