观测云接入 NewRelic .NET 探针

2023-09-14 19:59:46

背景

部分客户系统采用的是.NET 4.5 部署研发的、基于 IIS 进行发布的 Web 项目,需要接入到观测云进行链路信息展示,ddtrace 和 otel 对于低版本.NET 支持力度有限。

环境信息

  • IIS 4.0
  • .NET core 4.0、4.5、4.6
  • Window Server 2012 R2

域名配置

准备一个域名 www.datakit.com,需要申请 https 证书

配置 host

修改 hosts 文件,添加两个域名

127.0.0.1 www.google.com
127.0.0.1 www.datakit.com
  • www.google.com: NewRelic Agent 在生效前需要去访问一下 google,目的是确保网络通畅
  • www.datakit.com: NewRelic Agent 上报链路数据采用的是 tls,需要一个域名和证书信息

域名生效

在 IIS 下新增网站,域名为 www.google.com,端口为 80

根证书配置

如果申请的 https 证书是购买的,一般不需要配置根证书,如果属于自签证书,则需要配置。

Windows服务器如何导入根证书

NewRelic 接入

经调查研究表明,NewRelic .NET Agent 版本 6.27 可用于当前客户环境,采集链路并上报数据到观测云(DataKit采集上报)进行统一的信息展示。

下载安装 .NET Agent

安装前需要准备一个 NewRelic license,安装时需要用到,可以随意填写,也可以填写固定值eu01xx332b83865e13171131e7f9e08dFFFFNRAL

安装完成后有两个目录

  • C:\Program Files\New Relic\.NET Agent

  • C:\ProgramData\New Relic\.NET Agent

其中 C:\Program Files\New Relic\.NET Agent 目录下有个 newrelic.conf 文件,采集.NET 信息需要。

IIS 下 NewRelic 配置

使用管理员权限打开 PowerShell,执行以下命令

$env:COR_ENABLE_PROFILING=1;
$env:COR_PROFILER={71DA0A04-7777-4EC6-9643-7D28B46A8A41};
$env:NEWRELIC_INSTALL_PATH="C:\Program Files\New Relic\.NET Agent";
$env:NEW_RELIC_HOST="www.datakit.com";

在 PowerShell 使用 Get-ChildItem env:查看命令是否生效,该命令会列出当前系统的所有环境变量信息

DataKit 安装&配置

安装

参考安装文档

DataKit 的安装目录为 C:\Program Files\datakit

调整 DataKit 配置

DataKit 全局配置文件为datakit.conf,这里需要调整datakit.conf,让其至此 tls

[http_api]
  rum_origin_ip_header = "X-Forwarded-For"
  listen = "0.0.0.0:9529"
  disable_404page = false
  rum_app_id_white_list = []
  public_apis = []
  timeout = "30s"
  close_idle_connection = false
  [http_api.tls]
    cert="/cert/cmyncp.com_cert.pem"
    privkey="/cert/cmyncp.com_key.pem"

其中 [http_api.tls] 为开启 tls 模块

  • cert:域名公钥证书
  • privkey:域名私钥证书

路径建议填写绝对路径,否则可能会出现意想不到的效果

开启 NewRelic 采集器

进入 DataKit 安装目录下,并进入 conf.d/newrelic,复制 newrelic.config.samplenewrelic.config

重启 DataKit

在 PowerShell 下执行一下命令

datakit service -R

应用接入 NewRelic .NET Agent

配置 newrelic.conf

<?xml version="1.0"?>
<!-- Copyright (c) 2008-2017 New Relic, Inc.  All rights reserved. -->
<!-- For more information see: https://newrelic.com/docs/dotnet/dotnet-agent-configuration -->
<configuration xmlns="urn:newrelic-config" agentEnabled="true">
  <service licenseKey="eu01xx332b83865e13171131e7f9e08dFFFFNRAL" ssl="true" host="www.datakit.com" port="9529"/>
  <application>
    <name>water-web</name>
  </application>
  <log level="debug" auditLog="true"/>
  <transactionTracer enabled="true" transactionThreshold="apdex_f" stackTraceThreshold="500" recordSql="obfuscated" explainEnabled="false" explainThreshold="500" />
  <crossApplicationTracer enabled="true" />
  <errorCollector enabled="true">
    <ignoreErrors>
      <exception>System.IO.FileNotFoundException</exception>
      <exception>System.Threading.ThreadAbortException</exception>
    </ignoreErrors>
    <ignoreStatusCodes>
      <code>401</code>
      <code>404</code>
    </ignoreStatusCodes>
  </errorCollector>
  <browserMonitoring autoInstrument="true" />
  <threadProfiling>
    <ignoreMethod>System.Threading.WaitHandle:InternalWaitOne</ignoreMethod>
    <ignoreMethod>System.Threading.WaitHandle:WaitAny</ignoreMethod>
  </threadProfiling>
</configuration>

配置说明:
licenseKey: license 信息
host: 上报的主机
port: 上报端口
application > name: 应用名称
log: 日志信息

其中 host 和 port可以通过全局变量的方式进行配置

$env:NEW_RELIC_HOST="www.datakit.com";
$env:NEW_RELIC_PORT=9529;

重启 IIS

net stop /y was # stop iis

net start w3svc # start iis

访问应用

只有访问了应用,系统才会生成链路数据,并进行数据上报。

2023-09-11 07:19:05,603 NewRelic INFO: Configuration file found in app/web root directory: C:\Users\Administrator\Desktop\public\newrelic.config
2023-09-11 07:19:05,632 NewRelic INFO: The log level was updated to DEBUG
2023-09-11 07:19:05,766 NewRelic DEBUG: Available storage type : NewRelic.Providers.Storage.CallStack.AsyncLocal.CallContextStorageFactory (True)
2023-09-11 07:19:05,768 NewRelic DEBUG: Available storage type : NewRelic.Providers.Storage.TransactionContext.AspTransactionContextFactory (True)
2023-09-11 07:19:05,772 NewRelic DEBUG: Available storage type : NewRelic.Providers.Storage.TransactionContext.Wcf3TransactionContextFactory (True)
2023-09-11 07:19:05,774 NewRelic DEBUG: Using async storage NewRelic.Providers.Storage.CallStack.AsyncLocal.CallContextStorageFactory for call stack
2023-09-11 07:19:06,030 NewRelic INFO: Reading configuration from "C:\Users\Administrator\Desktop\public\newrelic.config"
2023-09-11 07:19:06,049 NewRelic INFO: The New Relic .NET Agent v6.27.0.0 started (pid 4344) for virtual path '/'
2023-09-11 07:19:06,050 NewRelic WARN: This version of the agent is primarily meant for monitoring .NET Framework 3.5 applications. This application is running on .NET CLR version 4.0.30319.42000. If you do not need to monitor any .NET Framework 3.5 applications on this server, please consider upgrading to the latest version of the New Relic .NET Agent which supports .NET Framework 4.5 and higher.
2023-09-11 07:19:06,076 NewRelic DEBUG: Wrapper "NewRelic.Providers.Wrapper.ServiceStackRedis.SendCommandWrapper" will be used for instrumented method "ServiceStack.Redis.RedisNativeClient.SendCommand"
2023-09-11 07:19:06,391 NewRelic DEBUG: Invoking "preconnect" with : []
2023-09-11 07:19:07,309 NewRelic DEBUG: Wrapper "NewRelic.Providers.Wrapper.Asp35.IntegratedPipeline.ExecuteStepWrapper" will be used for instrumented method "System.Web.HttpApplication.ExecuteStep"
2023-09-11 07:19:07,548 NewRelic DEBUG: Wrapper "NewRelic.Providers.Wrapper.Asp35.Shared.RouteNamingWrapper" will be used for instrumented method "System.Web.Routing.RouteCollection.GetRouteData"
2023-09-11 07:19:07,733 NewRelic DEBUG: Wrapper "NewRelic.Providers.Wrapper.Asp35.Shared.CallHandlerWrapper" will be used for instrumented method "System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute"
2023-09-11 07:19:07,782 NewRelic DEBUG: Wrapper "NewRelic.Providers.Wrapper.Mvc3.AsyncBeginInvokeActionWrapper" will be used for instrumented method "System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction"
2023-09-11 07:19:07,851 NewRelic DEBUG: Wrapper "NewRelic.Providers.Wrapper.Mvc3.AsyncEndInvokeActionWrapper" will be used for instrumented method "System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction"
2023-09-11 07:19:08,026 NewRelic DEBUG: Wrapper "NewRelic.Providers.Wrapper.Asp35.Shared.FilterWrapper" will be used for instrumented method "System.Web.HttpWriter.FilterIntegrated"
2023-09-11 07:19:08,053 NewRelic DEBUG: Wrapper "NewRelic.Providers.Wrapper.Asp35.IntegratedPipeline.FinishPipelineRequestWrapper" will be used for instrumented method "System.Web.HttpRuntime.FinishPipelineRequest"
2023-09-11 07:19:08,424 NewRelic DEBUG: Received : {"redirect_host":"www.cmyncp.com","security_policies":{"record_sql":{"enabled":true,"required":true},"attributes_include":{"enabled":true,"required":true},"allow_raw_exception_messages":{"enabled":true,"required":true},"custom_events":{"enabled":true,"required":true},"custom_parameters":{"enabled":true,"required":true}}}
2023-09-11 07:19:08,527 NewRelic INFO: Your New Relic Application Name(s): water-web
2023-09-11 07:19:09,775 NewRelic DEBUG: Invoking "connect" with : [{"pid":4344,"language":"dotnet","host":"iZw4p6289ecf7qZ","app_name":["water-web"],"agent_version":"6.27.0.0","agent_version_timestamp":1611791638918,"build_timestamp":1611791638918,"security_settings":{"capture_params":false,"transaction_tracer":{"record_sql":"obfuscated"}},"high_security":false,"identifier":"/LM/W3SVC/2/ROOT:publicwater-web","labels":[],"settings":{"browser_monitoring.loader_debug":false,"browser_monitoring.loader":"rum"},"utilization":{"metadata_version":3,"logical_processors":2,"total_ram_mib":2047,"hostname":"iZw4p6289ecf7qZ"},"environment":[["Framework","dotnet"],["Product Name","New Relic .NET Agent"],["OS","Microsoft Windows NT 6.3.9600.0"],[".NET Version","4.0.30319.42000"],["Total Physical System Memory",2146873344],["x64","yes"],["StartTime","2023-09-11T15:19:00.0918856+08:00"],["MainModule.FileVersionInfo","File:             c:\\windows\\system32\\inetsrv\\w3wp.exe\r\nInternalName:     w3wp.exe\r\nOriginalFilename: w3wp.exe.mui\r\nFileVersion:      8.5.9600.16384 (winblue_rtm.130821-1623)\r\nFileDescription:  IIS Worker Process\r\nProduct:          Internet Information Services\r\nProductVersion:   8.5.9600.16384\r\nDebug:            False\r\nPatched:          False\r\nPreRelease:       False\r\nPrivateBuild:     False\r\nSpecialBuild:     False\r\nLanguage:         语言中性\r\n"],["GCSettings.IsServerGC",true],["AppDomain.FriendlyName","/LM/W3SVC/2/ROOT-1-133388903407442996"],["AppDomainAppPath",null],["AppDomainAppId","/LM/W3SVC/2/ROOT"],["AppDomainAppVirtualPath","/"],["UsingIntegratedPipeline","True"],["IIS Version","8.5"],["Plugin List",["mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","System.Runtime.Caching, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","Microsoft.JScript, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","WaterCloud.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","WaterCloud.DataBase, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","Chloe, Version=4.5.0.0, Culture=neutral, PublicKeyToken=null","System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","WaterCloud.Code, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","WaterCloud.SystemTask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","ServiceStack.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","ServiceStack.Redis, Version=3.9.71.0, Culture=neutral, PublicKeyToken=null","ServiceStack.Common, Version=3.9.70.0, Culture=neutral, PublicKeyToken=null","ServiceStack.Text, Version=3.9.71.0, Culture=neutral, PublicKeyToken=null","NewRelic.Agent.Core, Version=6.0.0.0, Culture=neutral, PublicKeyToken=06552fced0b33d87","NewRelic.Agent.Extensions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","Microsoft.GeneratedCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","NewRelic.Core, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Parsing, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.CallStack.AsyncLocal, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.TransactionContext.Asp, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.TransactionContext.Wcf3, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","NewRelic.Providers.Wrapper.Asp35, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.CastleMonoRail2, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.Couchbase, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.CustomInstrumentation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.CustomInstrumentationAsync, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.HttpClient, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.HttpWebRequest, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.MongoDb, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.Msmq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.Mvc3, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.NServiceBus, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.OpenRasta, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.Owin, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.Owin3, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.RabbitMq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.RestSharp, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.ScriptHandlerFactory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.ServiceStackRedis, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.Sql, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.SqlAsync, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.StackExchangeRedis, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.Wcf3, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.WebApi1, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.WebApi2, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.WebOptimization, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.WebServices, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","NewRelic.Providers.Wrapper.WrapperUtilities, Version=6.0.0.0, Culture=neutral, PublicKeyToken=f7f92cc5c2dc8743","System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"]],["system.web.compilation.defaultLanguage","vb"],["Physical Processors",1],["Logical Processors",2]]}]
2023-09-11 07:19:09,880 NewRelic DEBUG: Received : {"return_value":{"agent_run_id":"","request_headers_map":{},"max_payload_size_in_bytes":1000000,"entity_guid":"","transaction_segment_terms":null,"transaction_name_rules":null,"url_rules":null,"metric_name_rules":null,"encoding_key":"","cross_process_id":"","trusted_account_ids":null,"web_transactions_apdex":null,"apdex_t":0.5,"collect_analytics_events":false,"collect_custom_events":false,"collect_traces":true,"collect_errors":false,"collect_error_events":false,"collect_span_events":true,"js_agent_loader":"","beacon":"","browser_key":"","application_id":"","error_beacon":"","js_agent_file":"","messages":null,"account_id":"","trusted_account_key":"","primary_application_id":"","sampling_target":10,"sampling_target_period_in_seconds":60,"agent_config":{"transaction_tracer.enabled":null,"transaction_tracer.transaction_threshold":null,"transaction_tracer.stack_trace_threshold":null,"error_collector.enabled":null,"error_collector.ignore_status_codes":null,"error_collector.expected_status_codes":null,"cross_application_tracer.enabled":null},"event_harvest_config":{"report_period_ms":60000,"harvest_limits":{"analytic_event_data":10000,"custom_event_data":30000,"log_event_data":10000,"error_event_data":100,"span_event_data":1000}},"span_event_harvest_config":{"report_period_ms":60,"harvest_limit":1000},"data_report_period":60}}
2023-09-11 07:19:09,924 NewRelic INFO: Agent /LM/W3SVC/2/ROOT:publicwater-web connected to www.datakit.com:9529
2023-09-11 07:19:10,009 NewRelic DEBUG: Invoking "agent_settings" with : [{"apdex_t":0.5,"cross_process_id":"","encoding_key":"","trusted_account_ids":[],"max_stack_trace_lines":80,"using_server_side_config":true,"thread_profiler.enabled":true,"cross_application_tracer.enabled":true,"error_collector.enabled":false,"error_collector.ignore_status_codes":["401","404"],"error_collector.ignore_errors":["System.IO.FileNotFoundException","System.Threading.ThreadAbortException"],"transaction_tracer.stack_trace_threshold":0.5,"transaction_tracer.explain_enabled":false,"transaction_tracer.max_sql_statements":500,"transaction_tracer.max_explain_plans":20,"transaction_tracer.explain_threshold":0.5,"transaction_tracer.transaction_threshold":2.0,"transaction_tracer.record_sql":"obfuscated","slow_sql.enabled":true,"browser_monitoring.auto_instrument":true}]
2023-09-11 07:19:10,019 NewRelic DEBUG: Received : {}
2023-09-11 07:19:10,022 NewRelic INFO: Agent fully connected.

登陆观测云帐号查看数据信息

在这里插入图片描述

更多推荐

CSS笔记

选择器通配选择器*{}元素选择器元素{}类选择器.类名{}id选择器#id名{}复合选择器交集选择器/*p元素且类名为beauty的元素*/p.beauty{}.rich.beauty{}并集选择器又称分组选择器.rich,.beauty,.navtop,#myIMage{}后代选择器<!--选中后代中所有li--><

python小程序 图书馆图书借阅借还管理系统 mbc21

为设计一个安全便捷,并且使借阅者更好获取本图书借还信息,本文主要有安全、简洁为理念,实现借阅者快捷寻找图书借还信息,从而解决图书借还信息复杂难辨的问题。该系统以django架构技术为基础,采用python语言和MySQL数据库进行开发设计,通过对图书借还管理流程的分析,分析了其功能性和非功能性需求,设计了基于微信小程序

设计模式:桥接模式

目录组成部分代码实现优缺点总结桥接模式是一种软件设计模式,用于将抽象部分与其实现部分分离,使它们可以独立地变化。该模式通过创建一个桥接接口,将抽象类和实现类连接起来,从而使它们可以独立地进行修改和扩展。桥接模式可以提高系统的灵活性和可扩展性,同时也有助于简化系统的设计。组成部分桥接模式的各个组成部分包括:抽象部分(Ab

有了Spring为什么还需要SpringBoot呢

目录一、Spring缺点分析二、什么是SpringBoot三、SpringBoot的核心功能3.1起步依赖3.2自动装配一、Spring缺点分析1.配置文件和依赖太多了!!!spring是一个非常优秀的轻量级框架,以IOC(控制反转)和AOP(面向切面)为思想内核,极大简化了JAVA企业级项目的开发。虽然Spring的

docker - 分享

1.docker介绍:Docker是一种虚拟化技术,它允许你在一台机器上运行多个应用程序,每个应用程序都运行在一个独立的虚拟器中,互相之间不会干扰。这些容器使用了操作系统级别的虚拟化技术,课可以在同一物理机器上运行多个应用程序,同时每个容器又拥有自己独立的文件系统和资源管理。Docker可以让你快速地创建、部署、和复制

开心档之JavaScript 异步编程

JavaScript异步编程目录JavaScript异步编程异步的概念什么时候用异步编程回调函数实例实例实例异步AJAX实例实例异步的概念异步(Asynchronous,async)是与同步(Synchronous,sync)相对的概念。在我们学习的传统单线程编程中,程序的运行是同步的(同步不意味着所有步骤同时运行,而

云原生微服务治理 第五章 Spring Cloud Netflix 之 Ribbon

系列文章目录第一章Java线程池技术应用第二章CountDownLatch和Semaphone的应用第三章SpringCloud简介第四章SpringCloudNetflix之Eureka第四章SpringCloudNetflix之Ribbon文章目录系列文章目录@[TOC](文章目录)前言1、负载均衡1.1、服务端负

Python in Visual Studio Code 2023年9月更新

作者:CourtneyWebster-ProgramManager,PythonExtensioninVisualStudioCode排版:AlanWang我们很高兴地宣布VisualStudioCode的Python和Jupyter扩展将于2023年9月发布!此版本包括以下内容:•将Python的“Recreate”

uniapp----微信小程序 日历组件(周日历&& 月日历)【Vue3+ts+uView】

uniapp----微信小程序日历组件(周日历&&月日历)【Vue3+ts+uView】用Vue3+ts+uView来编写日历组件;存在周日历和月日历两种显示方式;高亮显示当天日期,红点渲染有数据的日期,点击显示数据1.calendar-week-mouth组件代码<template><viewclass="calen

虹科分享 | 谷歌Vertex AI平台使用Redis搭建大语言模型

文章来源:虹科云科技点此阅读原文基础模型和高性能数据层这两个基本组件始终是创建高效、可扩展语言模型应用的关键,利用Redis搭建大语言模型,能够实现高效可扩展的语义搜索、检索增强生成、LLM缓存机制、LLM记忆和持久化。有Redis加持的大语言模型可应用于文档检索、虚拟购物助手、客户服务助理等,为企业带来益处。一、语言

服务器的架构有哪些

服务器的架构有哪些1、单体架构软件设计经典的3层模型是表现层,业务逻辑层,数据访问层。典型的单体架构就是将所有的业务场景的表现层,业务逻辑层,数据访问层放在一个工程中最终经过编译,打包,部署在一台服务器上。2、垂直架构垂直架构是将一个大项目,按照业务场景纵向拆分为互不相干的单体架构的项目。3、前后端分离前后端分离是横向

热文推荐