The purpose of this work is to study the capabilities of the Julia language for numerical modeling of stochastic systems. As a stochastic system we consider the model of interaction between the process of data transmission via the Transmission Control Protocol (TCP) and the process of regulating the flow state using the Random Early Detection (RED) algorithm. The mathematical model of this interaction is a system of stochastic differential equations, where there are both continuous and discrete elements of the model. When simulating such systems, it is important to consider the properties of continuous parameters, such as queue length of a router and the TCP window size, as well as discrete transitions between TCP states and the probabilistic packet drop function. Such hybrid systems can be quite easily implemented in specialized dynamic systems modeling languages, for example in Modelica. However, this software package does not have built-in universal tools for modeling stochastic systems, where it is important to consider the random nature of the behavior. The aim of this work is to find optimal tools for modeling such stochastic systems using the Julia language which in used for scientific calculations. For modeling the RED algorithm, the DifferentialEquations.jl library is used. This tool of the Julia language allows solving various kinds of differential equations, including stochastic differential equations and delay differential equations. As a result of the simulation graphs were obtained that demonstrate the dynamics of changes of the TCP window size and the queue length, depending on the initial model parameters and queue threshold values, the correct selection of which ensures the stable operation of the system. © 2021 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).