"Weeks of programming can save you hours of planning." - A Harckernews pt-BR "Semanas de programação podem te economizar horas de planejamento" - Hackernews
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to Optimize MySQL Queries for Speed and Performance | |
original url: https://dzone.com/articles/how-to-optimize-mysql-queries-for-speed-and-perfor | |
In this guide, we will take you through the steps of optimizing SQL queries and databases on your Alibaba Cloud Elastic Compute Service (ECS) instance. This will guarantee stability, scalability, reliability and speed of applications and websites running on your Alibaba Cloud instance. | |
Prerequisites | |
A valid Alibaba cloud account. If you don't have one already, you can sign up for an Alibaba Cloud and enjoy $300 worth in Free Trial. | |
A server running your favorite operating system that can support MySQL (e.g. Ubuntu, Centos, Debian). | |
MySQL database server. |
swarm | kubernetes |
---|---|
docker service list | kubectl get pods |
docker service logs service-name | kubectl logs deployment-name container-name |
docker exec -it container-id command | kubectl exec -it pod-name [-c container-name] -- command |
kubectl describe pod/srv pod-name/srv-name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
spec: | |
selector: | |
matchLabels: | |
app: nginx | |
replicas: 2 # tells deployment to run 2 pods matching the template | |
template: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: default | |
kind: pipeline | |
type: docker | |
steps: | |
- name: backend | |
image: golang | |
commands: | |
- go get |
Buildbot python http://buildbot.net/ https://docs.buildbot.net/current/tutorial/
Drone.io GO https://drone.io github.com/drone https://docs.drone.io/server/provider/github/
GitLab https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/
Jenkins Java https://www.jenkins.io/doc/book/pipeline/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
} | |
location /api/ { | |
proxy_pass http://localhost:5000/; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang as build-env | |
WORKDIR /app | |
ADD ./vendor/* /go/src/github.com/ | |
ADD . /app | |
ENV GOOS=linux | |
ENV GOARCH=amd64 | |
ENV CGO_ENABLED=0 | |
RUN cd /app && go build -o app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" | |
"sync" |