What is Blue / Green deployment?

Systems that take a method called Blue/Green deployment have increased.

In place: Reflect only the new revision application on the spot, leaving the instance intact.
Blue / Green: Build and replace a new instance for new revision applications.

And it can roughly classify the following three categories at the reflection speed with another axis different from the realization method.

All at once: Deploy all of them all at once with new revisions.
One by one: Deploy a new revision one by one.
Batch: Deploy a few new revisions(eg half)

There are people often thinking about Blue/Green deployment “only new instances of the revision are constructed by switching to the same number as it is now”, but this kind of deployment method is also called Red/Black deployment in recent years. This is just one way of “deployment at all at once in Blue/Green”

In place
– Merit
Since this method does not require additional instances at deployment, it is very effective in environments where it is not easy to create instances such as on-premises environments. Since it is enough to distribute only the application and restart or the like to the instance where hardware purchase, OS installation and various settings have already been completed, additional instance costs are not required at high speed.

– Demerit
One is tat remote operation is required. Remote operation is to operate on an instance that is running by way of ssh etc. In the case of using ssh, it is necessary to manage the key, so the construction of the instance becomes somewhat complicated, and the risk of opening a hole such as ssh etc. for the instance used in the production environment is reduced as much as possible from the very beginning it is safer to have it. Although we can alleviate this somewhat by using an agent type mechanism like AWS CodeDeploy, we do not change the risk of distributing files or executing arbitrary commands during operation.
Finally it is also difficult to roll back. Consistency is more likely to collapse when returning things that have changed once. “In Place”, there is the fact that you have to maintain two types of deployment, “deploy application” and “deploy under application”.

Blue/Green
Blue/Green is not necessarily just switching before preparing the same scale in Blue/Green. The point is that it does not do anything for running, it creates a new revision on another instance and switches over the whole green/blue according to an arbitrary strategy.

– Merit
You can eliminate all the disadvantages of in place mentioned above. First of all, for remote operation, we do not make any changes to the running instance at deployment, so we do not need anything. Instances need not have any mechanisms related to deployment. This also simplifies the application development process.

Regarding consistency, if you create an instance image (Amazon Machine Image(AMI) for Amazon EC2) for each deployment as an extreme way of way of making it, you can guarantee that instances of the same revision are of exactly the same configuration. This is the method that Netflix is taking.

Rollback is very easy. Because Blue does not have any changes in deployment, you simply need to return traffic to Blue. Even after discarding Blue, restoration is also easy if you restart it from AMI of the past revision.

As described above, in Blue/Green deployment is carried out together with “deployment of application” with lower deployment, so for example, it is possible to realize OS updates and the like with exactly the same mechanism, the deployment process becomes one and maintenance also will be much easier.

– Demerit
For example, it is said that cost is high for making AMI for each deployment. Especially it takes time to rebuild from AMI when deploying minor fixes. This can be avoided to some extent by automating the creation of AMI and configuring a CI / CD pipeline that is already ready for deployment. Rather than creating an AMI for each deployemnt, you can keep the AMI of the basic configuration fixed so that you get the latest revision at instance startup, but in that case a breakdown of consistency similar to “In place” care should be taken as it can happen.

Also typically said is the cost of having to make extra instances. Although you wan to make a bit of modification you have to bother to set up an instance, trying all at once will double the cost temporarily, and that is certainly a waste.

Think about development quotation

development quotation
– Implementation
– Additional man-day or man-hour
– Unit Test
– Source Review
– Combined Test
– Release man-day
– Procedure preparation

Difference between external design and internal design
– external design
— system function, performance, condition
– internal design
— operation, function, physical data inside the system

Entity Relation arrow icon

What’s the meaning of entity relation arrow icon?

Looking at draw.io Entity Relation
draw.io

Arrow shows the numerical value of the relationship.
0 to many optional
1 to many
1 mandatory
1 to 1
0 to 1
many
many to many
1 optional to many optional
1 mandatory to many mandatory
many mandatory to many mandatory
many optional to many option

Extreamly rich in variety isn’t it??

Difference between GET and POST method

GET, POST are some of the HTTP methods negotiated by the specification.
Besides this there are also PUT, PATCH, HEAD, DELETE etc ..

GET method
GET adds it to the URL and makes a request

POST method
POST method is included in body of request.

GET adds directly to the URL so you can see the parameters with your eyes.
Since POST is included in body, it can not be seen with eyes.

There are different specifications when requesting with GET and POST, such as being able to send in binary, size restriction, etc.

Unite Test and Integration Test

Let’s start with the meaning of the unit test and the integration test.

UT(Unit Test)
Unit Test refer to tests done in small units such as functions and methods. For this reason, the main purpose is to check the actions to be performed on individual screen and functions.

In detail
– Is there something wrong with the display on the screen
– How about the behavior when link or button is pressed ?
– Is it possible to link(register, edit, delete) with the database
– Is the displayed message correct?
– Do not do unexpected actions

Integration Test
Integration Test(IT) refers to the test that combines programs that have completed unit test. So, it can omit the contents to be completed within one screen confirmed by unit test.

In detail
– Whether necessary information can be acquired from other functions
– Whether the changed data is reflected in other functions

—————-
Operation Check Test Case
Normal / abnormal, conditions, procedure, acquisition result, result
—————-
Input value table
input value, measurement result, remarks

Adding screen capture, DB command line capture
DEV environ ment


Integration Test Scenario
making test scenario that how user move.

Domain and IP address search

In the case of unauthorized access, it may be necessary to investigate the ip address of the request and check from where it is illegal access.

Let’s see CMAN.
https://www.cman.jp/network/support/ip.html

As the ip address is also the library of php, you can determine which continent, region request from the address.

Another ip address service.
https://www.iplocation.net/

Yes, search result was same between different services.

Development process detail

How to put together development process. Here is a sample of document to create.

– Request definition
– Business flow
– Screen transition diagram
– DFL
– Screen design
– Screen definition
– ER diagram
– DB table definition

If there is batch processing, also add batch processing. Let’s see the details.

This is so called Excel Engineer.