Long time no see. This is Ide. It's been a year since the last article.
The Advent calendar that came this year too! Yesterday, Danny, who loves young Hope Daniel Barenboim, wrote an article. The article is here
He is a cool guy who entered halfway through, I've come to touch the server all the time and it's promising in the future!
It is a retrospective article after joining the company If you are interested in Prakore, I hope you will feel the atmosphere!
With Danny's flow, I would like to look back on this year as well.
Until last year, my main language was PHP, but from this year I have been developing systems mainly for Ruby. The description method is unique and it was a pain at first, but looking back, it is a very fun language. There are still some parts that I haven't understood yet, so next year I'll move on to gain a deeper understanding!
Such a server application famous for Rails which is FW of ruby About puma / unicorn, the other day or yesterday I had a chance to look up the command I will summarize it together with the differences in functions.
Unicorn handles communication for each process. Therefore, if there is a slow io process, it will get stuck and the whole will be heavy. You need to increase the number of orkers to avoid this, The worker also depends on the number of CPU cores.
bundle exec unicorn -E production -c config/unicorn.rb -D
-E Execution environment variable -c location of configuration file -D daemonization
kill -QUIT cat pid file path
kill -QUIT master pid
kill -HUP cat pid file path
kill -HUP master pid
kill -USR2 cat pid file path
kill -USR2 master pid
Start a new process while keeping the old process After starting, execute a stop signal (QUIT) to stop the old process.
(Specifications are https://github.com/phusion/unicorn reference)
It became a standard function from rails 5.2. It enables parallel processing by accumulating request processing in thread units and executing it in multiples. It is possible to handle requests efficiently even when resources are scarce.
bundle exec puma -C config/puma.rb -d
-C Location of configuration file -d daemonization
kill -QUIT cat pid file path
kill -QUIT master pid
kill -USR1 cat pid file path
kill -USR1 master pid
kill -USR2 cat pid file path
kill -USR2 master pid
It would be nice if it could be used properly depending on the intended use. Unless it's a large system, it doesn't seem to affect performance. The article here summarizes the performance parts of both.
Tomorrow, Mr. Yoshi, a promising stock at the front desk, will write an article, so stay tuned! See you in a week! : raised_hand:
Now hiringļ¼ At Prakore, to create a free future We are looking for engineers and designers who want to adventure together! https://www.wantedly.com/projects/262436 Operation service PLACOLE DRESSY by Plakore farny by Plakore
Recommended Posts