NGINX-配对的上游故障转移

时间:2020-11-05 20:06:28

标签: nginx load-balancing nginx-reverse-proxy nginx-config failover

我有一组应用程序服务器,其中每个library(shiny) library(readxl) library(shinydashboard) library(plotly) date<-c(as.Date("2020-09-15", "%Y-%m-%d"),as.Date("2020-09-14", "%Y-%m-%d"), as.Date("2020-09-13", "%Y-%m-%d"),as.Date("2020-09-12", "%Y-%m-%d")) value<-c(5,6,7,8) value2<-c(0.2,0.3,0.4,0.5) df<-data.frame(date,value,value2) ui <- dashboardPage( dashboardHeader(title = "Dashboard Demo"), dashboardSidebar( sidebarMenu( dateRangeInput('dateRange', label = paste('Date range input'), start = min(df$date)+1, end = max(df$date), min = min(df$date), max = max(df$date), separator = " - ", format = "dd/mm/yy", startview = 'year' ) ) ), dashboardBody( plotlyOutput("plot") ) ) server <- shinyServer(function(input, output, session) { output$plot<-renderPlotly({ TATd <-subset(df, date>=input$dateRange[1]&date<=input$dateRange[2]) # Minimal theme + blue fill color p<-ggplot(data=TATd, aes(x=date, y=value)) + geom_bar(stat="identity", fill="steelblue")+ theme_minimal()+ labs(x = "Date of Specimen Collection",y="Total Tests per Day") ggplotly(p) }) }) shinyApp(ui, server) 服务器都已复制A的所有会话,每个B已复制了B服务器的所有会话。如果A发生故障,我需要确保故障转移到A,如果B发生故障,我需要确保故障转移到B

A

有人知道如何使用NGINX配置这种故障转移/负载平衡吗?

谢谢。

0 个答案:

没有答案