14. #AMIMOTO @Amimoto_Ami
HIGH
PERFORMANCE
Load Test with a Simple
(Apache Bench) Command
15. #AMIMOTO @Amimoto_Ami
9 GLOBAL DATA CENTERS
Singapore ⋅ Tokyo ⋅ Sydney ⋅
Sao Paulo ⋅ N. Virginia ⋅
Oregon ⋅ N. California
Ireland ⋅ Frankfurt
—
WP Booster CDN
S3 (Simple Storage Service)
NINJA
SPEED
19. Average
Response
Dme
Number of
Processed
Requests
Nginx Cache
effecDveness
1566
ms
3108
ms
5387
2637
15 ms
Average
Response Dme
386830
Processed
requests
HHVM
vs.
php-‐fpm
20. 150-200
clients
HHVM
although slower
response,
HHVM is
sDll operaDng
(Dl the end)
php-‐fpm
is unmeasured
(Dl the end) &
50x errors
were received
22. #AMIMOTO @Amimoto_Ami
vs. loader.io
1
minute
0-‐300
client
increase
TEST
HHVM 3.6 vs. HHVM 3.9
23. Avg response Vme: 10563 ms
Success responses: 1189
Avg response Vme: 8259 ms
Success responses: 1685
HHVM 3.9
Response Vme improved by 20% & the total
request processing number increased by 50%.
HHVM 3.6 vs. HHVM 3.9
28. #AMIMOTO @Amimoto_Ami
60 Million PV / month
Lots of Images
Lots of AdverVsements
Social Media / Feed
Auto Scaling
Scale up & down
automaVcally
LARGE-‐SCALE MEDIA SITE
30. #AMIMOTO @Amimoto_Ami
MulVsite
MulVlingual
Needs to be high speed Nginx Cache
Controller Plugin
1 AMIMOTO instance =
can have mulVple
WordPress installs
Install MulVlingual
WordPress Plugin
HUGE ENTERPRISE SITE
32. #AMIMOTO @Amimoto_Ami
WPBooster CDN
Thousands of posts
MulVple authors
Needs to be MulVlingual
Sudden traffic surge
Possible with
WordPress
NEWS SITE
33. #AMIMOTO @Amimoto_Ami
AMIMOTO HHVM 14 days Free Trial
38. #AMIMOTO @Amimoto_Ami
Auto Scaling
in
AMIMOTO
apps with stable
demand paoerns
apps with different
usage daily, weekly
39. #AMIMOTO @Amimoto_Ami
Auto Scaling
in AMIMOTO
Cost-‐efficient
Increase / decrease
instances based on
how high or low
the load will be.
40. #AMIMOTO @Amimoto_Ami
Automa9c Recovery
for instances
that suddenly died
Auto Scaling
in AMIMOTO
41. #AMIMOTO @Amimoto_Ami
Machine
Learning
discover data (like
buying paoerns) &
make models with it
DATA:
% chance customer
will buy, how many &
what are the most
interesVng products
42. #AMIMOTO @Amimoto_Ami
Amazon Machine
Learning
Upload data
Output
upload
sample data
to ML Data Set
Architecture
48. #AMIMOTO @Amimoto_Ami
Choose the
nearest region
where the site
will mostly be
accessed from.
49. #AMIMOTO @Amimoto_Ami
EC2: ElasVc Cloud
Compute
Provides flexibility
Scales up on high traffic
Scales down on low traffic
50. #AMIMOTO @Amimoto_Ami
Launch a virtual
server to start
using EC2
AMIMOTO
HHVM
51. #AMIMOTO @Amimoto_Ami
AMIMOTO
HHVM
Free trial is
only for
t2.micro
instance
52. #AMIMOTO @Amimoto_Ami
Launching
mulVple instances
is possible, but
the Free Trial only
allows 1 instance
You can configure these, or use the default sesngs
60. #AMIMOTO @Amimoto_Ami
can remain with you
even there is no associated instance
returned (and cannot be retrieved)
as soon as you stop a Virtual Machine
OpVonal
When you create a Virtual Machine,
you get a Public IP
No maoer how many Vmes
you stop / start an intance with EIP,
the same IP will conVnue to be available
as the public IP of the Virtual Machine.
If there is no EIP,
each Vme you stop and start the instance,
you get a new Public IP every Vme.
hop://blog.digitalcube.jp/archives/1870
ElasDc IP Address vs. Public IP Address
73. #AMIMOTO @Amimoto_Ami
phpMyAdmin
1. switch to the root user by “su -‐”
(.conf files are usually owned by root)
2. modify default.conf or example.com.conf
at /etc/nginx/conf.d/
75. #AMIMOTO @Amimoto_Ami
Aeer ediDng:
run # service nginx restart to restart Nginx
Then you can access to phpMyAdmin with
hop://example.com/phpMyAdmin/
Login & Password of phpMyAdmin
are similar to the one in wp-‐config.php.
76. #AMIMOTO @Amimoto_Ami
AMIMOTO has phpMyAdmin installed,
but we disabled it because:
many vulnerabiliVes has been found before in phpMyAdmin,
so even it is not installed, many fraudulent accesses have been tried
Axer using phpMyAdmin, disable it.
78. #AMIMOTO @Amimoto_Ami
EXPORTING DATABASE
wp db export [<file>]
You can give any name +.sql
to the file name.
Axer that, an sql is created.
IMPORTING DATABASE
wp db import [<file>]
You should upload an
sql file to your server.
REPLACING STRINGS
wp search-‐replace <old>
<new>
With -‐-‐dry-‐run opVon, you can
see the result without execuVng
the actual replacement.
RESETTING PASSWORD
wp user update <user> -‐-‐
user_pass=marypass
<user> is the login name, mail
address or user ID.
-‐-‐user_pass opVon is the new
password.
OPTIMIZING DATABASE
wp db opVmize
<user> is the login name or mail
address or user ID.
-‐-‐user_pass opVon is the new
password.
FOR OTHER
COMMANDS:
hop://wp-‐cli.org/
commands/db/
96. #AMIMOTO @Amimoto_Ami
ROUTE 53
is a Domain Name System (DNS)
web service.
FUNCTION:
to route end users to Internet apps by
translaVng www.example.com into the
numeric IP addresses like 192.0.2.1 that
computers use to connect to each other.
105. #AMIMOTO @Amimoto_Ami
NEXT STEPS:
Domain: amimotohandson.info
Obtained from: GoDaddy
• Login to GoDaddy (or wherever you got the domain from)
• then paste the NS Values you just copied from AWS Route 53.
115. DigitalCube Team & What We Do
Why WordPress + Amazon Web Services
AMIMOTO features
Performance Tests
HHVM vs. php-‐fpm
HHVM 3.6 vs. 3.9
Sites on AMIMOTO
WordPress + Amazon Web Services
Instance SelecVon
Connect WP with tools
Autoscaling
Machine Learning (for e-‐commerce)
AWS Console
AWS Console / Dashboard
Launch Virtual Server
Configure Instance
Key Pair
ElasVc IP Address
Public IP Address
Set up WordPress
AcVvate pre-‐installed plugins
NGINX Cache Controller Plugin
Database Management
phpMyAdmin
WP-‐CLI
Scale up & down of instance
SFTP
Route 53
Terminate Instance
Release ElasVc IP Address