{{Short description|Distributed messaging software}} {{Infobox software | title = NATS | name = NATS | logo = NATS-logo.png | screenshot = | caption = | developer = [https://www.cncf.io/projects/nats/ Cloud Native Computing Foundation] | latest release version = [https://github.com/nats-io/nats-server/releases 2.14.0] | latest release date = {{Start date and age|2026|04|30}} | released = 2011 <ref>{{Cite web|url=https://github.com/nats-io/nats.rb/releases/tag/v0.3.12|title = Release v0.3.12 · nats-io/Nats.rb|website = GitHub}}</ref> | programming language = Go | operating system = Cross-platform | genre = Message broker, message-oriented middleware | license = Apache 2.0 | repo = {{URL|https://github.com/nats-io/nats-server}} | website = {{URL|https://www.nats.io/}} }}
'''NATS''' ("Neural Autonomic Transport System"<ref name="faq">{{Cite web |title=NATS FAQ |url=https://docs.nats.io/reference/faq#what-does-the-nats-acronym-stand-for}}</ref>) is an open-source messaging system developed under the stewardship of the Cloud Native Computing Foundation. The NATS server is written in the Go programming language. Client libraries to interface with the server are available for dozens of major programming languages. The core design principles of NATS are performance, scalability, and ease of use.<ref>{{Cite web | url=https://docs.nats.io | title=NATS Documentation}}</ref>
NATS was originally developed by [https://twitter.com/derekcollison Derek Collison] as the messaging control plane for Cloud Foundry and was written in Ruby. NATS was later ported to Go.
The source code is released under the Apache 2.0 License. NATS consists of: * The [https://github.com/nats-io/nats-server/ NATS Server] - The core Publish-Subscribe Server for NATS. * [https://nats.io/download/ Client libraries] for a variety of programming languages. * A [https://github.com/nats-io/nats-connector-framework connector framework] - a pluggable Java based framework to connect NATS and other services.
The NATS server is often referred to as either 'Core NATS' or NATS with 'JetStream'. 'Core NATS' is the set of core NATS functionalities and qualities of service. 'JetStream' is the (optionally enabled) built-in persistence layer that adds streaming, queues, at-least-once and exactly-once delivery guarantees, historical data replay, decoupled flow-control and key/value store functionalities to Core NATS.<ref name="faq"/> JetStream replaced the old STAN (NATS Streaming) approach.<ref>{{Cite web | url=https://docs.nats.io/nats-concepts/jetstream | title=NATS JetStream}}</ref>
==Example==
Below is a sample connection string from a telnet connection to the demo.nats.io site:<ref>{{cite web|title=NATS Protocol|url=https://docs.nats.io/nats-protocol/nats-protocol-demo|website=NATS Documentation|accessdate=6 May 2016}}</ref>
<syntaxhighlight lang="go"> Trying 107.170.221.32... Connected to demo.nats.io. Escape character is '^]'. INFO {"server_id":"NDH3TUKI4Q5S72ESTECUI6AN7GWZT7VGLMQ6NJTIZTIPFK65OTRERVLZ","server_name":"nats-demo-us-tx","version":"2.12.8","proto":1,"git_commit":"e9559e9","go":"go1.25.9","host":"0.0.0.0","port":4222,"headers":true,"tls_available":true,"max_payload":1048576,"jetstream":true,"client_id":37220096,"client_ip":"2605:a601:a0f6:c100:84d:60c8:7e1f:37b7","nonce":"oiCSqsFWATMKZkc","api_lvl":3,"xkey":"XCCVI7W3IKXVZEI7JXNPM6OX76H2HXI4GGCOIBGCDQUAO6XEDGRERHHV"} </syntaxhighlight>
==References== {{reflist}}
== See also == * Message passing * Message-oriented middleware {{Portal|Free and open-source software}}
===Further reading=== * {{cite web|last1=Aslam|first1=Asim|title=Micro on NATS - Microservices with Messaging|url=https://blog.micro.mu/2016/04/11/micro-on-nats.html |archive-url=https://web.archive.org/web/20160422011408/https://blog.micro.mu/2016/04/11/micro-on-nats.html |archive-date=2016-04-22 |website=Micro Blog|accessdate=6 May 2016}} * {{cite news|last1=Werthheim|first1=Daniel|title=NATS - What a beautiful protocol|newspaper=Danielwertheim |url=http://danielwertheim.se/nats-what-a-beautiful-protocol/|accessdate=4 May 2016|date=2016-04-27}} * {{cite web|last1=Riggins|first1=Jennifer|title=How NATS, a REST Alternative, Provides Messaging for Distributed Systems|url=http://thenewstack.io/nats-rest-alternative-provides-messaging-distributed-systems/|website=TheNewStack|accessdate=6 May 2016|date=2015-12-15}} * {{cite web|last1=Monteiro|first1=Diogo|title=Using NATS instead of HTTP for inter service communication|url=http://www.diogogmt.com/2016/02/08/benchmarking-nats-and-rest/ |archive-url=https://web.archive.org/web/20180717093843/www.diogogmt.com/2016/02/08/benchmarking-nats-and-rest/ |archive-date=2018-07-17 |website=Diogo GMT|accessdate=2 May 2016}} * {{cite web|last1=Sohlich|first1=Radomir|title=NATS to REST Proxy|url=http://nats.io/blog/natsproxy_project/|website=NATS Blog|date=23 April 2016|accessdate=1 May 2016}} * {{cite web|last1=Gracely|first1=Brian|last2=Delp|first2=Aaron|title=NATS - Cloud Native Infrastructure|url=http://www.thecloudcast.net/2015/12/the-cloudcast-233-nats-cloud-native.html|website=The CloudCast|accessdate=23 December 2015}} * {{cite web|title=A signaling system for 10M+ concurrent connections|url=http://blog.greta.io/a-webrtc-signaling-system-that-scales-very-effectively/|website=Greta.io|publisher=Greta|accessdate=6 May 2016|date=2016-03-21}} * {{cite web|last1=Treat|first1=Tyler|title=Benchmarking Message Queue Latency|url=https://bravenewgeek.com/benchmarking-message-queue-latency/|website=Brave New Geek|date=13 February 2016 }} * {{cite web|last1=Fulton III|first1=Scott|title=NATS Moves to Real-time Message Streaming with Persistence|url=http://thenewstack.io/apcera-nats-moves-real-time-message-stream-brokering/|website=The New Stack|accessdate=19 July 2016|date=2016-07-18}} * {{cite web|title=Protecting NATS and the integrity of open source|url=https://www.cncf.io/blog/2025/04/24/protecting-nats-and-the-integrity-of-open-source-cncfs-commitment-to-the-community/|website=CNCF|accessdate=25 April 2025|date=2025-04-24}}
{{Message-oriented middleware}}
Category:Free software programmed in Go Category:Message-oriented middleware Category:Cloud infrastructure Category:Free software for cloud computing Category:Service-oriented architecture-related products Category:Enterprise application integration Category:Cross-platform free software Category:Software using the Apache license