Skip to content

Instantly share code, notes, and snippets.

View hotsen's full-sized avatar
💭
Pending

Alexander hoth hotsen

💭
Pending
View GitHub Profile
FROM ubuntu:latest
RUN apt-get install -y language-pack-ja-base language-pack-ja
update-locale LANG=ja_JP.UTF-8 LANGUAGE=”ja_JP:ja”
# for Java
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
apt-get update && \
1. I see that most of your connections and queries are running on the master(writer) database instance itself without much load on the reader instance. You can consider dividing your workload such that read-only queries/workloads are directed to the reader instance, and only write queries are handled by your writer instance. This will help alleviate the large undo logs(RollbackSegmentHistoryListLength) due to long running queries and in itself this should mitigate a lot of the performance issues.
One way to achieve splitting of Reads and Writes is by making use of a third party software Proxy solution which can split reads and writes to the appropriate endpoints. Below are a few example software solutions which you can consider:
[+] ProxySQL - https://proxysql.com/
[+] Heimdall Data - https://www.heimdalldata.com/
2. If and where possible, try to split large transactions into multiple smaller transactions. This will again reduce the growth of the undo log which seems to be the main cause of t
@hotsen
hotsen / Dockerfile-Nginx
Created March 11, 2019 11:04 — forked from joekr/Dockerfile-Nginx
Kubernetes + Rails (NGINX & Unicorn) on GCE
# Set nginx base image
FROM nginx
# Copy custom configuration file from the current directory
COPY nginx.conf /etc/nginx/nginx.conf
@hotsen
hotsen / App.js
Last active May 26, 2018 13:58
Simple Firestore/State Subscription
// https://github.com/invertase/react-native-firebase/issues/568#issuecomment-389733298
import firebase from './Firebase';
const db = firebase.firestore();
db.collection("messages")
.where("chatId", "==", this.props.chatId)
.orderBy("createdAt", "desc")
.limit(5)
// Thanks to github/@megahertz - https://gist.github.com/megahertz/3aad3adafa0f7d212b81f5e371863637
import { Children } from "react"
import { Provider } from 'mobx-react/native';
import { ApolloProvider } from 'react-apollo';
const SPECIAL_REACT_KEYS = { children: true, key: true, ref: true };
export default class MobxRnnProvider extends Provider {
props: {
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: "*"
workflow: tests
workflows:
_tests_setup:
steps:
- activate-ssh-key: {}
@hotsen
hotsen / install.sh
Created February 8, 2018 13:17
Install Requirements for React Native Development
## Brew
#
# Install Brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Make sure Brew has permissions
brew doctor
# Update Brew
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
trigger_map:
- push_branch: "*"
workflow: tests
workflows:
_tests_setup:
steps:
- activate-ssh-key: {}
@hotsen
hotsen / .babelrc
Created January 5, 2018 13:47
Firebase Functions (ES6/ES7)
{
"presets": [
[
"@babel/env",
{
"targets": {
"node": "current"
}
}
]
const admin = require('./node_modules/firebase-admin');
const serviceAccount = require("./service-key.json");
const data = require("./data.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://YOUR_DB.firebaseio.com"
});